From ea4d0715034fb7afaa5a5c0f903cbaaf6efd986f Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 2 Feb 2024 09:20:09 +1100 Subject: [PATCH] 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. --- .github/workflows/check-frontend.yml | 1 + .github/workflows/check-pytest.yml | 1 + .github/workflows/check-python.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/check-frontend.yml b/.github/workflows/check-frontend.yml index be2c3b0fde..8134926556 100644 --- a/.github/workflows/check-frontend.yml +++ b/.github/workflows/check-frontend.yml @@ -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 diff --git a/.github/workflows/check-pytest.yml b/.github/workflows/check-pytest.yml index 0839c1d5a4..89b0408f7e 100644 --- a/.github/workflows/check-pytest.yml +++ b/.github/workflows/check-pytest.yml @@ -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: diff --git a/.github/workflows/check-python.yml b/.github/workflows/check-python.yml index c37fb5683c..63a6c46b0a 100644 --- a/.github/workflows/check-python.yml +++ b/.github/workflows/check-python.yml @@ -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