Skip to content

Commit

Permalink
Add timeouts to jobs (#946)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
mhucka authored Feb 9, 2025
1 parent 50b2980 commit 88599e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

on:
pull_request:
Expand Down Expand Up @@ -56,6 +56,7 @@ env:
jobs:
Setup:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out a copy of the OpenFermion git repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -85,6 +86,7 @@ jobs:
name: Format check
needs: Setup
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -107,6 +109,7 @@ jobs:
name: Type check
needs: Setup
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

Expand All @@ -127,6 +130,7 @@ jobs:
name: Lint check
needs: Setup
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

Expand All @@ -146,6 +150,7 @@ jobs:
pytest-max-compat:
name: Pytest max compat
runs-on: ubuntu-20.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v4

Expand All @@ -167,6 +172,7 @@ jobs:
name: Pytest matrix
needs: Setup
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
Expand Down Expand Up @@ -208,6 +214,7 @@ jobs:
name: Pytest extra matrix
needs: Setup
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/nightly-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
# Try to fit as much info as possible into the GHA sidebar at run-time.
name: Py ${{matrix.python-version}} + ${{matrix.os}}/${{matrix.arch}}
runs-on: ${{matrix.os}}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
Expand Down

0 comments on commit 88599e5

Please sign in to comment.