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
This commit is contained in:
Daniel Lockyer 2022-01-14 10:21:42 +00:00
parent 5037517aad
commit 34e8c299e7
No known key found for this signature in database
GPG Key ID: D21186F0B47295AD

View File

@ -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