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: jobs:
check-frontend: check-frontend:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 10 # expected run time: <2 min
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View File

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

View File

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