diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cedc5f6b8..80826f468 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,6 +4,12 @@ on: push: branches: - master + +concurrency: + # Cancel previous workflow run when a new commit is pushed to a feature branch + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + env: PY_COLORS: 1 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d5154a9cb..dce45a2dd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,6 +6,11 @@ on: branches: - master +concurrency: + # Cancel previous workflow run when a new commit is pushed to a feature branch + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + env: PYTHON_VERSION: 3.9