From b806b821e7ada155ebe0e547e47e1b54e25a81aa Mon Sep 17 00:00:00 2001 From: Carl Csaposs Date: Wed, 1 Mar 2023 19:42:13 +0000 Subject: [PATCH] Cancel CI that is not the latest commit on a branch (#73) --- .github/workflows/ci.yaml | 7 +++++++ .github/workflows/release.yaml | 2 ++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6544bdb9a9..5865d3f195 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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: @@ -13,6 +17,7 @@ jobs: lint: name: Lint runs-on: ubuntu-latest + timeout-minutes: 5 steps: - name: Checkout uses: actions/checkout@v3 @@ -25,6 +30,7 @@ jobs: unit-test: name: Unit tests runs-on: ubuntu-latest + timeout-minutes: 5 steps: - name: Checkout uses: actions/checkout@v3 @@ -58,6 +64,7 @@ jobs: - unit-test - build runs-on: ubuntu-latest + timeout-minutes: 120 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 33b7b6aafa..4b3ea5f156 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,6 +9,7 @@ jobs: lib-check: name: Check libraries runs-on: ubuntu-latest + timeout-minutes: 5 steps: - name: Checkout uses: actions/checkout@v2 @@ -29,6 +30,7 @@ jobs: - lib-check - ci-tests runs-on: ubuntu-20.04 + timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v2