From 374cbb4d4acfaddc500716a9e74799a2f069cb4a Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 1 Feb 2022 16:33:54 -0600 Subject: [PATCH 1/2] use built in run cancellation --- .github/workflows/check-release.yml | 4 ++++ .github/workflows/downstream.yml | 4 ++++ .github/workflows/enforce-label.yml | 4 ++++ .github/workflows/main.yml | 25 ++++--------------------- 4 files changed, 16 insertions(+), 21 deletions(-) diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml index c7451d40c..13da6195b 100644 --- a/.github/workflows/check-release.yml +++ b/.github/workflows/check-release.yml @@ -5,6 +5,10 @@ on: pull_request: branches: ["*"] +concurrency: + group: check-release-${{ github.ref }} + cancel-in-progress: true + permissions: contents: write diff --git a/.github/workflows/downstream.yml b/.github/workflows/downstream.yml index 3f765554c..da53a0316 100644 --- a/.github/workflows/downstream.yml +++ b/.github/workflows/downstream.yml @@ -6,6 +6,10 @@ on: pull_request: branches: "*" +concurrency: + group: downstream-${{ github.ref }} + cancel-in-progress: true + jobs: tests: runs-on: ubuntu-latest diff --git a/.github/workflows/enforce-label.yml b/.github/workflows/enforce-label.yml index 354a0468d..8296e75d4 100644 --- a/.github/workflows/enforce-label.yml +++ b/.github/workflows/enforce-label.yml @@ -1,5 +1,9 @@ name: Enforce PR label +concurrency: + group: label-${{ github.ref }} + cancel-in-progress: true + on: pull_request: types: [labeled, unlabeled, opened, edited, synchronize] diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bffd1a48e..9d345b2c4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,30 +4,16 @@ on: push: pull_request: +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + jobs: - check_duplicate_runs: - name: Check for duplicate runs - continue-on-error: true - runs-on: ubuntu-latest - outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} - steps: - - id: skip_check - uses: fkirc/skip-duplicate-actions@master - with: - concurrent_skipping: always - cancel_others: true - skip_after_successful_duplicate: true - paths_ignore: '["**/README.md", "**/CHANGELOG.md", "**/COPYING.md"]' - do_not_skip: '["pull_request"]' # Run "pre-commit run --all-files" pre-commit: name: Run pre-commit hook - needs: check_duplicate_runs - if: ${{ needs.check_duplicate_runs.outputs.should_skip != 'true' }} - runs-on: ubuntu-latest timeout-minutes: 2 @@ -60,9 +46,6 @@ jobs: build-n-test-n-coverage: name: Build, test and code coverage - needs: check_duplicate_runs - if: ${{ needs.check_duplicate_runs.outputs.should_skip != 'true' }} - runs-on: ${{ matrix.os }} strategy: From ad7f76c9a30b83882644d16636b8505cea04c997 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 1 Feb 2022 16:37:09 -0600 Subject: [PATCH 2/2] lint --- .github/workflows/check-release.yml | 1 + .github/workflows/main.yml | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml index 13da6195b..f93ffec5b 100644 --- a/.github/workflows/check-release.yml +++ b/.github/workflows/check-release.yml @@ -18,6 +18,7 @@ jobs: strategy: matrix: group: [check_release, link_check] + fail-fast: false steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9d345b2c4..fe4aa8c78 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,7 +9,6 @@ concurrency: cancel-in-progress: true jobs: - # Run "pre-commit run --all-files" pre-commit: name: Run pre-commit hook