summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatalia <124304+nessita@users.noreply.github.com>2025-11-25 22:18:50 -0300
committerJacob Walls <jacobtylerwalls@gmail.com>2025-11-26 08:05:32 -0500
commit7d7f27bc9881dede6337212db1e9ccdbd37addae (patch)
treeee117cfc9286292d9ad5afaf3a522beb70a77eae
parentb40c057c2585d0bc62a7e1c4cd96969ed9acf556 (diff)
[4.2.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.yml1
-rw-r--r--.github/workflows/check_commit_messages.yml1
-rw-r--r--.github/workflows/docs.yml2
-rw-r--r--.github/workflows/linters.yml4
-rw-r--r--.github/workflows/new_contributor_pr.yml1
-rw-r--r--.github/workflows/python_matrix.yml2
-rw-r--r--.github/workflows/schedule_tests.yml1
-rw-r--r--.github/workflows/schedules.yml1
-rw-r--r--.github/workflows/tests.yml2
9 files changed, 15 insertions, 0 deletions
diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml
index 9c3735f848..2116605a22 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@v4
diff --git a/.github/workflows/check_commit_messages.yml b/.github/workflows/check_commit_messages.yml
index a4594d611c..16b67ea9a3 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@v4
with:
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 0c5f8e8175..6e6c65e019 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -23,6 +23,7 @@ jobs:
docs:
runs-on: ubuntu-24.04
name: docs
+ timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -43,6 +44,7 @@ jobs:
blacken-docs:
runs-on: ubuntu-latest
name: blacken-docs
+ timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml
index 7076a1b8b2..0096b1c9b0 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@v4
@@ -40,6 +41,7 @@ jobs:
isort:
runs-on: ubuntu-latest
+ timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -59,6 +61,7 @@ jobs:
black:
runs-on: ubuntu-latest
+ timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -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 3602abf109..7a28b6cdde 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:
- uses: actions/first-interaction@v1
with:
diff --git a/.github/workflows/python_matrix.yml b/.github/workflows/python_matrix.yml
index 979025dd07..afd3f696d4 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@v4
@@ -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@v4
diff --git a/.github/workflows/schedule_tests.yml b/.github/workflows/schedule_tests.yml
index 8cfa0e47e9..10ecde03eb 100644
--- a/.github/workflows/schedule_tests.yml
+++ b/.github/workflows/schedule_tests.yml
@@ -22,6 +22,7 @@ jobs:
- '3.11'
- '3.12-dev'
name: Windows, SQLite, Python ${{ matrix.python-version }}
+ timeout-minutes: 60
continue-on-error: true
steps:
- name: Checkout
diff --git a/.github/workflows/schedules.yml b/.github/workflows/schedules.yml
index bd9cced240..610d8a0f7d 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/tests.yml b/.github/workflows/tests.yml
index 31e9f69ad1..d57d9354a6 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -25,6 +25,7 @@ jobs:
python-version:
- '3.11'
name: Windows, SQLite, Python ${{ matrix.python-version }}
+ timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -45,6 +46,7 @@ jobs:
javascript-tests:
runs-on: ubuntu-latest
name: JavaScript tests
+ timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4