diff options
| author | Natalia <124304+nessita@users.noreply.github.com> | 2025-11-25 22:18:50 -0300 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-11-26 08:01:52 -0500 |
| commit | 0868b7151a3921c6a1d8d946ab80cee5702d8f3b (patch) | |
| tree | 64e8c4f454b830ab5489e31f71b99ffd78a58559 | |
| parent | 938de87854fbb16ebffebed1e859628c8ee06fff (diff) | |
[6.0.x] Added timeout-minutes directive to all GitHub Actions workflows.
GitHub Actions defaults to a 360-minute (6-hour) timeout. We've had jobs
hang due to issues in the parallel test runner, causing them to run for
the full 6 hours. This wastes resources and negatively impacts CI
availability, so explicit timeouts have been added to prevent
long-running hangs.
Backport of e48527f91d341c85a652499a5baaf725d36ae54f from main.
| -rw-r--r-- | .github/workflows/benchmark.yml | 1 | ||||
| -rw-r--r-- | .github/workflows/check_commit_messages.yml | 1 | ||||
| -rw-r--r-- | .github/workflows/docs.yml | 3 | ||||
| -rw-r--r-- | .github/workflows/labels.yml | 1 | ||||
| -rw-r--r-- | .github/workflows/linters.yml | 4 | ||||
| -rw-r--r-- | .github/workflows/new_contributor_pr.yml | 1 | ||||
| -rw-r--r-- | .github/workflows/postgis.yml | 1 | ||||
| -rw-r--r-- | .github/workflows/python_matrix.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/schedule_tests.yml | 6 | ||||
| -rw-r--r-- | .github/workflows/schedules.yml | 1 | ||||
| -rw-r--r-- | .github/workflows/screenshots.yml | 1 | ||||
| -rw-r--r-- | .github/workflows/selenium.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/tests.yml | 2 |
13 files changed, 26 insertions, 0 deletions
diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index c803546c78..7ffb022593 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -11,6 +11,7 @@ jobs: Run_benchmarks: if: contains(github.event.pull_request.labels.*.name, 'benchmark') runs-on: ubuntu-latest + timeout-minutes: 60 steps: - name: Checkout Benchmark Repo uses: actions/checkout@v5 diff --git a/.github/workflows/check_commit_messages.yml b/.github/workflows/check_commit_messages.yml index ece0bcac4e..fe67536eb5 100644 --- a/.github/workflows/check_commit_messages.yml +++ b/.github/workflows/check_commit_messages.yml @@ -15,6 +15,7 @@ jobs: check-commit-prefix: if: startsWith(github.event.pull_request.base.ref, 'stable/') runs-on: ubuntu-latest + timeout-minutes: 60 steps: - uses: actions/checkout@v5 with: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4100c9ea21..bfa4f9cb52 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -23,6 +23,7 @@ jobs: docs: runs-on: ubuntu-24.04 name: spelling + timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v5 @@ -43,6 +44,7 @@ jobs: blacken-docs: runs-on: ubuntu-latest name: blacken-docs + timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v5 @@ -66,6 +68,7 @@ jobs: lint-docs: runs-on: ubuntu-latest name: lint-docs + timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v5 diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index 79ee8af59d..807563322f 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -19,6 +19,7 @@ jobs: if: github.repository == 'django/django' name: "Flag if no Trac ticket is found in the title" runs-on: ubuntu-latest + timeout-minutes: 60 steps: - uses: actions/checkout@v5 with: diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 7b58bacacf..0f916fa24f 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -21,6 +21,7 @@ jobs: flake8: name: flake8 runs-on: ubuntu-latest + timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v5 @@ -40,6 +41,7 @@ jobs: isort: runs-on: ubuntu-latest + timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v5 @@ -59,6 +61,7 @@ jobs: black: runs-on: ubuntu-latest + timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v5 @@ -69,6 +72,7 @@ jobs: zizmor: runs-on: ubuntu-latest + timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v5 diff --git a/.github/workflows/new_contributor_pr.yml b/.github/workflows/new_contributor_pr.yml index 194adb3bb8..054ee0f1d5 100644 --- a/.github/workflows/new_contributor_pr.yml +++ b/.github/workflows/new_contributor_pr.yml @@ -15,6 +15,7 @@ jobs: if: github.repository == 'django/django' name: Hello new contributor runs-on: ubuntu-latest + timeout-minutes: 60 steps: # Pin to v1: https://github.com/actions/first-interaction/issues/369 - uses: actions/first-interaction@v1 diff --git a/.github/workflows/postgis.yml b/.github/workflows/postgis.yml index 772f12fafe..92595dc28b 100644 --- a/.github/workflows/postgis.yml +++ b/.github/workflows/postgis.yml @@ -36,6 +36,7 @@ jobs: --health-interval 10s --health-timeout 5s --health-retries 5 + timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v5 diff --git a/.github/workflows/python_matrix.yml b/.github/workflows/python_matrix.yml index 00fcc89f71..da78202493 100644 --- a/.github/workflows/python_matrix.yml +++ b/.github/workflows/python_matrix.yml @@ -20,6 +20,7 @@ jobs: runs-on: ubuntu-latest outputs: python_versions_output: ${{ steps.set-matrix.outputs.python_versions }} + timeout-minutes: 60 steps: - name: Checkout code uses: actions/checkout@v5 @@ -36,6 +37,7 @@ jobs: strategy: matrix: python-version: ${{ fromJson(needs.define-matrix.outputs.python_versions_output) }} + timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v5 diff --git a/.github/workflows/schedule_tests.yml b/.github/workflows/schedule_tests.yml index 85a2e4ccdf..11b86664df 100644 --- a/.github/workflows/schedule_tests.yml +++ b/.github/workflows/schedule_tests.yml @@ -20,6 +20,7 @@ jobs: - '3.13' - '3.14' name: Windows, SQLite, Python ${{ matrix.python-version }} + timeout-minutes: 60 continue-on-error: true steps: - name: Checkout @@ -41,6 +42,7 @@ jobs: pyc-only: runs-on: ubuntu-latest name: Byte-compiled Django with no source files (only .pyc files) + timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v5 @@ -69,6 +71,7 @@ jobs: javascript-tests: runs-on: ubuntu-latest name: JavaScript tests + timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v5 @@ -86,6 +89,7 @@ jobs: selenium-sqlite: runs-on: ubuntu-latest name: Selenium tests, SQLite + timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v5 @@ -110,6 +114,7 @@ jobs: selenium-postgresql: runs-on: ubuntu-latest name: Selenium tests, PostgreSQL + timeout-minutes: 60 services: postgres: image: postgres:14-alpine @@ -155,6 +160,7 @@ jobs: server_side_bindings: [0, 1] runs-on: ubuntu-latest name: PostgreSQL Versions + timeout-minutes: 60 env: SERVER_SIDE_BINDING: ${{ matrix.server_side_bindings }} services: diff --git a/.github/workflows/schedules.yml b/.github/workflows/schedules.yml index 435921bccd..72ebf52f9c 100644 --- a/.github/workflows/schedules.yml +++ b/.github/workflows/schedules.yml @@ -14,6 +14,7 @@ jobs: runs-on: ubuntu-latest environment: schedules name: Trigger Full Build + timeout-minutes: 60 # Only trigger on the main Django repository if: (github.event_name == 'schedule' && github.repository == 'django/django') || (github.event_name != 'schedule') strategy: diff --git a/.github/workflows/screenshots.yml b/.github/workflows/screenshots.yml index 6014f9dec9..a2a070cc7a 100644 --- a/.github/workflows/screenshots.yml +++ b/.github/workflows/screenshots.yml @@ -18,6 +18,7 @@ jobs: if: contains(join(github.event.pull_request.labels.*.name, '|'), 'screenshots') runs-on: ubuntu-latest name: Screenshots + timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v5 diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index 9691569361..40d20d2bcd 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -18,6 +18,7 @@ jobs: if: contains(github.event.pull_request.labels.*.name, 'selenium') runs-on: ubuntu-latest name: SQLite + timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v5 @@ -43,6 +44,7 @@ jobs: if: contains(github.event.pull_request.labels.*.name, 'selenium') runs-on: ubuntu-latest name: PostgreSQL + timeout-minutes: 60 services: postgres: image: postgres:14-alpine diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4114f60f5a..2035ebd6d7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,6 +25,7 @@ jobs: python-version: - '3.14' name: Windows, SQLite, Python ${{ matrix.python-version }} + timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v5 @@ -45,6 +46,7 @@ jobs: javascript-tests: runs-on: ubuntu-latest name: JavaScript tests + timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@v5 |
