Skip to content

Commit 37e165e

Browse files
authored
Cancel old CI runs when new one is started. (#1651)
* Cancel old CI runs when new one is started. This should save some CI minutes (and concurrency)
1 parent dd294be commit 37e165e

27 files changed

+189
-27
lines changed

.github/workflows/test-integration-aiohttp.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ on:
88

99
pull_request:
1010

11+
# Cancel in progress workflows on pull_requests.
12+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
1117
permissions:
1218
contents: read
1319

@@ -53,4 +59,4 @@ jobs:
5359
./scripts/runtox.sh "${{ matrix.python-version }}-aiohttp" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
5460
coverage combine .coverage*
5561
coverage xml -i
56-
codecov --file coverage.xml
62+
codecov --file coverage.xml

.github/workflows/test-integration-asgi.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ on:
88

99
pull_request:
1010

11+
# Cancel in progress workflows on pull_requests.
12+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
1117
permissions:
1218
contents: read
1319

@@ -53,4 +59,4 @@ jobs:
5359
./scripts/runtox.sh "${{ matrix.python-version }}-asgi" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
5460
coverage combine .coverage*
5561
coverage xml -i
56-
codecov --file coverage.xml
62+
codecov --file coverage.xml

.github/workflows/test-integration-aws_lambda.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ on:
88

99
pull_request:
1010

11+
# Cancel in progress workflows on pull_requests.
12+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
1117
permissions:
1218
contents: read
1319

@@ -53,4 +59,4 @@ jobs:
5359
./scripts/runtox.sh "${{ matrix.python-version }}-aws_lambda" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
5460
coverage combine .coverage*
5561
coverage xml -i
56-
codecov --file coverage.xml
62+
codecov --file coverage.xml

.github/workflows/test-integration-beam.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ on:
88

99
pull_request:
1010

11+
# Cancel in progress workflows on pull_requests.
12+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
1117
permissions:
1218
contents: read
1319

@@ -53,4 +59,4 @@ jobs:
5359
./scripts/runtox.sh "${{ matrix.python-version }}-beam" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
5460
coverage combine .coverage*
5561
coverage xml -i
56-
codecov --file coverage.xml
62+
codecov --file coverage.xml

.github/workflows/test-integration-boto3.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ on:
88

99
pull_request:
1010

11+
# Cancel in progress workflows on pull_requests.
12+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
1117
permissions:
1218
contents: read
1319

@@ -53,4 +59,4 @@ jobs:
5359
./scripts/runtox.sh "${{ matrix.python-version }}-boto3" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
5460
coverage combine .coverage*
5561
coverage xml -i
56-
codecov --file coverage.xml
62+
codecov --file coverage.xml

.github/workflows/test-integration-bottle.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ on:
88

99
pull_request:
1010

11+
# Cancel in progress workflows on pull_requests.
12+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
1117
permissions:
1218
contents: read
1319

@@ -53,4 +59,4 @@ jobs:
5359
./scripts/runtox.sh "${{ matrix.python-version }}-bottle" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
5460
coverage combine .coverage*
5561
coverage xml -i
56-
codecov --file coverage.xml
62+
codecov --file coverage.xml

.github/workflows/test-integration-celery.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ on:
88

99
pull_request:
1010

11+
# Cancel in progress workflows on pull_requests.
12+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
1117
permissions:
1218
contents: read
1319

@@ -53,4 +59,4 @@ jobs:
5359
./scripts/runtox.sh "${{ matrix.python-version }}-celery" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
5460
coverage combine .coverage*
5561
coverage xml -i
56-
codecov --file coverage.xml
62+
codecov --file coverage.xml

.github/workflows/test-integration-chalice.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ on:
88

99
pull_request:
1010

11+
# Cancel in progress workflows on pull_requests.
12+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
1117
permissions:
1218
contents: read
1319

@@ -53,4 +59,4 @@ jobs:
5359
./scripts/runtox.sh "${{ matrix.python-version }}-chalice" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
5460
coverage combine .coverage*
5561
coverage xml -i
56-
codecov --file coverage.xml
62+
codecov --file coverage.xml

.github/workflows/test-integration-django.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ on:
88

99
pull_request:
1010

11+
# Cancel in progress workflows on pull_requests.
12+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
1117
permissions:
1218
contents: read
1319

@@ -70,4 +76,4 @@ jobs:
7076
./scripts/runtox.sh "${{ matrix.python-version }}-django" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
7177
coverage combine .coverage*
7278
coverage xml -i
73-
codecov --file coverage.xml
79+
codecov --file coverage.xml

.github/workflows/test-integration-falcon.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ on:
88

99
pull_request:
1010

11+
# Cancel in progress workflows on pull_requests.
12+
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
1117
permissions:
1218
contents: read
1319

@@ -53,4 +59,4 @@ jobs:
5359
./scripts/runtox.sh "${{ matrix.python-version }}-falcon" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
5460
coverage combine .coverage*
5561
coverage xml -i
56-
codecov --file coverage.xml
62+
codecov --file coverage.xml

0 commit comments

Comments
 (0)