ci: add reasonable timeouts for jobs

The timeouts are at least 3x the expected time to complete the jobs.

This is particularly relevant for the `pytest` job. Occasionally, it hangs while running tests that do network things, and the job only times out after 6 hours.
This commit is contained in:
psychedelicious 2024-02-02 09:20:09 +11:00 committed by Kent Keirsey
parent b95e5d0730
commit ea4d071503
3 changed files with 3 additions and 0 deletions

View File

@ -15,6 +15,7 @@ defaults:
jobs:
check-frontend:
runs-on: ubuntu-latest
timeout-minutes: 10 # expected run time: <2 min
steps:
- uses: actions/checkout@v4

View File

@ -44,6 +44,7 @@ jobs:
github-env: $env:GITHUB_ENV
name: ${{ matrix.pytorch }} on ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30 # expected run time: <10 min, depending on platform
env:
PIP_USE_PEP517: '1'
steps:

View File

@ -13,6 +13,7 @@ on:
jobs:
check-backend:
runs-on: ubuntu-latest
timeout-minutes: 5 # expected run time: <1 min
steps:
- uses: actions/checkout@v4