Skip to content

Commit 1d2c51c

Browse files
authored
Add timeouts for CI jobs (#5752)
1 parent d31ae0b commit 1d2c51c

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.github/workflows/ci.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
prepare-base:
1818
name: Prepare base dependencies
1919
runs-on: ubuntu-latest
20+
timeout-minutes: 5
2021
outputs:
2122
python-key: ${{ steps.generate-python-key.outputs.key }}
2223
pre-commit-key: ${{ steps.generate-pre-commit-key.outputs.key }}
@@ -76,6 +77,7 @@ jobs:
7677
formatting:
7778
name: checks / pre-commit
7879
runs-on: ubuntu-latest
80+
timeout-minutes: 5
7981
needs: prepare-base
8082
steps:
8183
- name: Check out code from GitHub
@@ -118,6 +120,7 @@ jobs:
118120
spelling:
119121
name: checks / spelling
120122
runs-on: ubuntu-latest
123+
timeout-minutes: 5
121124
needs: prepare-base
122125
steps:
123126
- name: Check out code from GitHub
@@ -148,6 +151,7 @@ jobs:
148151
prepare-tests-linux:
149152
name: tests / prepare / ${{ matrix.python-version }} / Linux
150153
runs-on: ubuntu-latest
154+
timeout-minutes: 5
151155
strategy:
152156
matrix:
153157
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
@@ -190,6 +194,7 @@ jobs:
190194
pytest-linux:
191195
name: tests / run / ${{ matrix.python-version }} / Linux
192196
runs-on: ubuntu-latest
197+
timeout-minutes: 10
193198
needs: prepare-tests-linux
194199
strategy:
195200
fail-fast: false
@@ -229,6 +234,7 @@ jobs:
229234
coverage:
230235
name: tests / process / coverage
231236
runs-on: ubuntu-latest
237+
timeout-minutes: 5
232238
needs: ["prepare-tests-linux", "pytest-linux"]
233239
strategy:
234240
matrix:
@@ -273,6 +279,7 @@ jobs:
273279
benchmark-linux:
274280
name: tests / run benchmark / ${{ matrix.python-version }} / Linux
275281
runs-on: ubuntu-latest
282+
timeout-minutes: 5
276283
needs: prepare-tests-linux
277284
strategy:
278285
fail-fast: false
@@ -324,6 +331,7 @@ jobs:
324331
prepare-tests-windows:
325332
name: tests / prepare / ${{ matrix.python-version }} / Windows
326333
runs-on: windows-latest
334+
timeout-minutes: 5
327335
strategy:
328336
matrix:
329337
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
@@ -366,6 +374,7 @@ jobs:
366374
pytest-windows:
367375
name: tests / run / ${{ matrix.python-version }} / Windows
368376
runs-on: windows-latest
377+
timeout-minutes: 10
369378
needs: prepare-tests-windows
370379
strategy:
371380
fail-fast: false
@@ -404,6 +413,7 @@ jobs:
404413
prepare-tests-pypy:
405414
name: tests / prepare / ${{ matrix.python-version }} / Linux
406415
runs-on: ubuntu-latest
416+
timeout-minutes: 5
407417
strategy:
408418
matrix:
409419
python-version: ["pypy3"]
@@ -446,6 +456,7 @@ jobs:
446456
pytest-pypy:
447457
name: tests / run / ${{ matrix.python-version }} / Linux
448458
runs-on: ubuntu-latest
459+
timeout-minutes: 10
449460
needs: prepare-tests-pypy
450461
strategy:
451462
fail-fast: false

.github/workflows/primer-test.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
prepare-tests-linux:
2525
name: prepare / ${{ matrix.python-version }} / Linux
2626
runs-on: ubuntu-latest
27+
timeout-minutes: 5
2728
strategy:
2829
matrix:
2930
python-version: [3.8, 3.9, "3.10"]
@@ -66,6 +67,7 @@ jobs:
6667
pytest-primer-stdlib:
6768
name: run on stdlib / ${{ matrix.python-version }} / Linux
6869
runs-on: ubuntu-latest
70+
timeout-minutes: 10
6971
needs: prepare-tests-linux
7072
strategy:
7173
matrix:
@@ -100,6 +102,7 @@ jobs:
100102
pytest-primer-external-batch-one:
101103
name: run on batch one / ${{ matrix.python-version }} / Linux
102104
runs-on: ubuntu-latest
105+
timeout-minutes: 60
103106
needs: prepare-tests-linux
104107
strategy:
105108
matrix:
@@ -134,6 +137,7 @@ jobs:
134137
pytest-primer-external-batch-two:
135138
name: run on batch two / ${{ matrix.python-version }} / Linux
136139
runs-on: ubuntu-latest
140+
timeout-minutes: 60
137141
needs: prepare-tests-linux
138142
strategy:
139143
matrix:

0 commit comments

Comments
 (0)