Skip to content

Commit e77994f

Browse files
committed
build(actions): add concurrency and timeouts for GitHub Actions
1 parent 0aed308 commit e77994f

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: CI
2+
23
on:
34
push:
45
branches:
@@ -8,11 +9,15 @@ on:
89
- main
910
- next
1011

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
1116
jobs:
1217
lint:
1318
name: lint
1419
runs-on: ubuntu-latest
15-
20+
timeout-minutes: 5
1621

1722
steps:
1823
- uses: actions/checkout@v4
@@ -33,6 +38,7 @@ jobs:
3338
test:
3439
name: test
3540
runs-on: ubuntu-latest
41+
timeout-minutes: 10
3642

3743
steps:
3844
- uses: actions/checkout@v4
@@ -53,6 +59,7 @@ jobs:
5359
examples:
5460
name: examples
5561
runs-on: ubuntu-latest
62+
timeout-minutes: 5
5663

5764
steps:
5865
- uses: actions/checkout@v4
@@ -68,7 +75,7 @@ jobs:
6875
run: |
6976
rye sync --all-features
7077
71-
- env:
78+
- env:
7279
CLOUDFLARE_ACCOUNT_ID: f037e56e89293a057740de681ac9abbe
7380
CLOUDFLARE_EMAIL: [email protected]
7481
CLOUDFLARE_ZONE_ID: 0da42c8d2132a9ddaf714f9e7c92011

.github/workflows/release-doctor.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
name: Release Doctor
2+
23
on:
34
pull_request:
45
workflow_dispatch:
56

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
611
jobs:
712
release_doctor:
813
name: release doctor
914
runs-on: ubuntu-latest
15+
timeout-minutes: 2
1016
if: github.repository == 'cloudflare/cloudflare-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
1117

1218
steps:

0 commit comments

Comments
 (0)