From 34e8c299e775bab3a973791e5cbbb6f657bfe91c Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Fri, 14 Jan 2022 10:21:42 +0000 Subject: [PATCH] Added concurrency option to test workflow in CI refs https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#example-using-a-fallback-value - CI sometimes becomes clogged up with concurrent runs for a PR if the PR is updated - this sometimes happens when we merge a bunch of Renovate PRs and other PRs rebase on top of `main` multiple times - we shouldn't continue to run tests for PRs if the branches have been pushed to since they started - from the referenced link above, this is the built-in solution that cancels previous in-progress runs if a new job starts --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0f62861153..8efd7e3b34 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,6 +10,9 @@ on: - 'renovate/*' env: FORCE_COLOR: 1 +concurrency: + group: ${{ github.head_ref || github.run_id }} + cancel-in-progress: true jobs: lint: runs-on: ubuntu-18.04