Skip to content

Commit 88599e5

Browse files
authored
Add timeouts to jobs (#946)
Google best practices for GitHub Actions recommend setting timeouts on jobs, to guard against unexpected problems causing jobs to take the full 60 minute GitHub default (go/github-actions#set-a-job-timeout).
1 parent 50b2980 commit 88599e5

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99

1010
name: Continuous integration checks
11-
run-name: Continuous integration checks triggered by ${{github.event_name}}
11+
run-name: CI checks for ${{github.event_name}} by ${{github.actor}}
1212

1313
on:
1414
pull_request:
@@ -56,6 +56,7 @@ env:
5656
jobs:
5757
Setup:
5858
runs-on: ubuntu-latest
59+
timeout-minutes: 10
5960
steps:
6061
- name: Check out a copy of the OpenFermion git repository
6162
uses: actions/checkout@v4
@@ -85,6 +86,7 @@ jobs:
8586
name: Format check
8687
needs: Setup
8788
runs-on: ubuntu-latest
89+
timeout-minutes: 10
8890
steps:
8991
- uses: actions/checkout@v4
9092
with:
@@ -107,6 +109,7 @@ jobs:
107109
name: Type check
108110
needs: Setup
109111
runs-on: ubuntu-latest
112+
timeout-minutes: 10
110113
steps:
111114
- uses: actions/checkout@v4
112115

@@ -127,6 +130,7 @@ jobs:
127130
name: Lint check
128131
needs: Setup
129132
runs-on: ubuntu-latest
133+
timeout-minutes: 10
130134
steps:
131135
- uses: actions/checkout@v4
132136

@@ -146,6 +150,7 @@ jobs:
146150
pytest-max-compat:
147151
name: Pytest max compat
148152
runs-on: ubuntu-20.04
153+
timeout-minutes: 15
149154
steps:
150155
- uses: actions/checkout@v4
151156

@@ -167,6 +172,7 @@ jobs:
167172
name: Pytest matrix
168173
needs: Setup
169174
runs-on: ${{ matrix.os }}
175+
timeout-minutes: 15
170176
strategy:
171177
matrix:
172178
os: [ ubuntu-latest, macos-latest, windows-latest ]
@@ -208,6 +214,7 @@ jobs:
208214
name: Pytest extra matrix
209215
needs: Setup
210216
runs-on: ${{ matrix.os }}
217+
timeout-minutes: 15
211218
strategy:
212219
matrix:
213220
os: [ubuntu-latest, macos-latest]

.github/workflows/nightly-pytest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
# Try to fit as much info as possible into the GHA sidebar at run-time.
1818
name: Py ${{matrix.python-version}} + ${{matrix.os}}/${{matrix.arch}}
1919
runs-on: ${{matrix.os}}
20+
timeout-minutes: 15
2021
strategy:
2122
fail-fast: false
2223
matrix:

0 commit comments

Comments
 (0)