From 8a0dd7ad6c7a30170de3b87f997577b8c86e2451 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Mon, 21 Oct 2024 13:26:55 +0200 Subject: [PATCH] Add timeout-minutes to ci config (#18003) Prevent blocking resources unnecessarily if something goes wrong and a CI task doesn't terminate. The default timeout would be 360 minutes. --- .github/workflows/docs.yml | 1 + .github/workflows/mypy_primer.yml | 1 + .github/workflows/sync_typeshed.yml | 1 + .github/workflows/test.yml | 2 ++ .github/workflows/test_stubgenc.yml | 1 + 5 files changed, 6 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 923d74a02f71..112102954dd3 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,6 +28,7 @@ concurrency: jobs: docs: runs-on: ubuntu-latest + timeout-minutes: 10 env: TOXENV: docs TOX_SKIP_MISSING_INTERPRETERS: False diff --git a/.github/workflows/mypy_primer.yml b/.github/workflows/mypy_primer.yml index fee7e6d079f1..2b2327798a72 100644 --- a/.github/workflows/mypy_primer.yml +++ b/.github/workflows/mypy_primer.yml @@ -32,6 +32,7 @@ jobs: matrix: shard-index: [0, 1, 2, 3, 4] fail-fast: false + timeout-minutes: 60 steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/sync_typeshed.yml b/.github/workflows/sync_typeshed.yml index b545e7b0662b..84d246441f3d 100644 --- a/.github/workflows/sync_typeshed.yml +++ b/.github/workflows/sync_typeshed.yml @@ -14,6 +14,7 @@ jobs: name: Sync typeshed if: github.repository == 'python/mypy' runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4150d1968bfb..9e6c9cd1d9b3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -126,6 +126,7 @@ jobs: toxenv: lint name: ${{ matrix.name }} + timeout-minutes: 60 env: TOX_SKIP_MISSING_INTERPRETERS: False # Rich (pip) -- Disable color for windows + pytest @@ -205,6 +206,7 @@ jobs: python_32bits: runs-on: ubuntu-latest name: Test mypyc suite with 32-bit Python + timeout-minutes: 60 env: TOX_SKIP_MISSING_INTERPRETERS: False # Rich (pip) diff --git a/.github/workflows/test_stubgenc.yml b/.github/workflows/test_stubgenc.yml index 519f63ac2bd7..0652702a0fc0 100644 --- a/.github/workflows/test_stubgenc.yml +++ b/.github/workflows/test_stubgenc.yml @@ -25,6 +25,7 @@ jobs: # Check stub file generation for a small pybind11 project # (full text match is required to pass) runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: actions/checkout@v4