Skip to content

Commit

Permalink
CI: Improve efficiency on GHA
Browse files Browse the repository at this point in the history
When pushing to the same branch on a PR, cancel running jobs of the same
kind.
  • Loading branch information
amotl committed Dec 13, 2022
1 parent acfe5b5 commit 4fae26d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
name: Tests

on:

push:
branches: [ main ]
pull_request:
branches: [ main ]

# Allow job to be triggered manually.
workflow_dispatch:

# Cancel in-progress jobs when pushing to the same branch.
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}

jobs:

tests:
Expand Down

0 comments on commit 4fae26d

Please sign in to comment.