Skip to content

Commit

Permalink
Cancel CI that is not the latest commit on a branch (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlcsaposs-canonical authored Mar 2, 2023
1 parent c335e52 commit 83b8e4d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# See LICENSE file for licensing details.
name: Tests

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
schedule:
Expand All @@ -13,6 +17,7 @@ jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -25,6 +30,7 @@ jobs:
unit-test:
name: Unit tests
runs-on: ubuntu-latest
timeout-minutes: 15 # TODO: reduce to 5 minutes
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -52,6 +58,7 @@ jobs:
- unit-test
- build
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
lib-check:
name: Check libraries
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -33,6 +34,7 @@ jobs:
- lib-check
- ci-tests
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down

0 comments on commit 83b8e4d

Please sign in to comment.