From 5601f12a2b19e04daea3a30a5001383f08d309df Mon Sep 17 00:00:00 2001 From: Javier Neira Date: Fri, 29 Oct 2021 12:29:10 +0200 Subject: [PATCH 1/3] Add option to cancel prev runs Without using skip-duplicate-actions which is failing due to github access permission. See https://github.com/fkirc/skip-duplicate-actions/issues/103 --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 70145d7851..742e728471 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,6 +4,10 @@ defaults: run: shell: bash +concurrency: + group: ${{ github.head_ref }} + cancel-in-progress: true + on: pull_request: branches: From 8ba3ee7cf3eecc873e6f864d1af78a7f097dc9ab Mon Sep 17 00:00:00 2001 From: Javier Neira Date: Fri, 29 Oct 2021 12:43:22 +0200 Subject: [PATCH 2/3] Cancel by branch *and* workflow Without it will cancel other workflows for the same branch Credits: 7b371e8b --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 742e728471..ffb69fe1d7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,8 +4,9 @@ defaults: run: shell: bash +# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency. concurrency: - group: ${{ github.head_ref }} + group: ${{ github.head_ref }}-${{ github.workflow }} cancel-in-progress: true on: From 61676e37cd460a5fe3027fe4e78e6eecba68671e Mon Sep 17 00:00:00 2001 From: Javier Neira Date: Fri, 29 Oct 2021 17:30:50 +0200 Subject: [PATCH 3/3] Disable cancelling other runs --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ffb69fe1d7..d39cd2c5f3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,12 +24,13 @@ jobs: - id: skip_check uses: fkirc/skip-duplicate-actions@v3.4.0 with: - cancel_others: true + cancel_others: false paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", "install/**", "**.nix", "flake.lock", "**/README.md", "FUNDING.yml"]' # If we only change ghcide downstream packages we have not test ghcide itself - id: skip_ghcide_check uses: fkirc/skip-duplicate-actions@v3.4.0 with: + cancel_others: false paths_ignore: '["hls-test-utils/**", "plugins/**", "src/**", "exe/**", "test/**", "shake-bench/**"]' - if: steps.skip_check.outputs.should_skip == 'true' name: Skip circleci