Files
django/.github/workflows/tests.yml
Natalia 7d7f27bc98 [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 e48527f91d from main.
2025-11-26 08:05:32 -05:00

63 lines
1.5 KiB
YAML

name: Tests
on:
pull_request:
paths-ignore:
- 'docs/**'
push:
branches:
- main
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
windows:
runs-on: windows-latest
strategy:
matrix:
python-version:
- '3.11'
name: Windows, SQLite, Python ${{ matrix.python-version }}
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'tests/requirements/py3.txt'
- name: Install and upgrade packaging tools
run: python -m pip install --upgrade pip setuptools wheel
- run: python -m pip install -r tests/requirements/py3.txt -e .
- name: Run tests
run: python tests/runtests.py -v2
javascript-tests:
runs-on: ubuntu-latest
name: JavaScript tests
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'
cache-dependency-path: '**/package.json'
- run: npm install
- run: npm test