Skip to content

Commit a62e111

Browse files
authored
Add timeouts for CI jobs (#1378)
1 parent f11981b commit a62e111

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
prepare-base:
1717
name: Prepare base dependencies
1818
runs-on: ubuntu-latest
19+
timeout-minutes: 5
1920
outputs:
2021
python-key: ${{ steps.generate-python-key.outputs.key }}
2122
pre-commit-key: ${{ steps.generate-pre-commit-key.outputs.key }}
@@ -76,6 +77,7 @@ jobs:
7677
formatting:
7778
name: Run pre-commit checks
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
prepare-tests-linux:
119121
name: Prepare tests for Python ${{ matrix.python-version }} (Linux)
120122
runs-on: ubuntu-latest
123+
timeout-minutes: 5
121124
strategy:
122125
matrix:
123126
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
@@ -161,6 +164,7 @@ jobs:
161164
pytest-linux:
162165
name: Run tests Python ${{ matrix.python-version }} (Linux)
163166
runs-on: ubuntu-latest
167+
timeout-minutes: 10
164168
needs: prepare-tests-linux
165169
strategy:
166170
fail-fast: false
@@ -200,6 +204,7 @@ jobs:
200204
coverage:
201205
name: Process test coverage
202206
runs-on: ubuntu-latest
207+
timeout-minutes: 5
203208
needs: ["prepare-tests-linux", "pytest-linux"]
204209
strategy:
205210
matrix:
@@ -244,6 +249,7 @@ jobs:
244249
prepare-tests-windows:
245250
name: Prepare tests for Python ${{ matrix.python-version }} (Windows)
246251
runs-on: windows-latest
252+
timeout-minutes: 5
247253
strategy:
248254
matrix:
249255
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
@@ -287,6 +293,7 @@ jobs:
287293
pytest-windows:
288294
name: Run tests Python ${{ matrix.python-version }} (Windows)
289295
runs-on: windows-latest
296+
timeout-minutes: 10
290297
needs: prepare-tests-windows
291298
strategy:
292299
fail-fast: false
@@ -325,6 +332,7 @@ jobs:
325332
prepare-tests-pypy:
326333
name: Prepare tests for Python ${{ matrix.python-version }}
327334
runs-on: ubuntu-latest
335+
timeout-minutes: 5
328336
strategy:
329337
matrix:
330338
python-version: ["pypy3"]
@@ -367,6 +375,7 @@ jobs:
367375
pytest-pypy:
368376
name: Run tests Python ${{ matrix.python-version }}
369377
runs-on: ubuntu-latest
378+
timeout-minutes: 10
370379
needs: prepare-tests-pypy
371380
strategy:
372381
fail-fast: false

0 commit comments

Comments
 (0)