-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.53 KB
/
run-pytest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Run Pytest
on: [push, pull_request]
env:
UV_SYSTEM_PYTHON: 1
jobs:
test:
name: Test on Python ${{ matrix.python-version }} and Django ${{ matrix.django-version }}
runs-on: ubuntu-latest
outputs:
failing-test: ${{ steps.test.outputs.fail }}
strategy:
matrix:
include:
# Django 4.2 combinations - supports Python 3.8-3.12
- python-version: "3.8"
django-version: "django>=4.2,<5.0"
- python-version: "3.9"
django-version: "django>=4.2,<5.0"
- python-version: "3.10"
django-version: "django>=4.2,<5.0"
- python-version: "3.11"
django-version: "django>=4.2,<5.0"
- python-version: "3.12"
django-version: "django>=4.2,<5.0"
# Django 5.0 combinations - requires Python 3.10+
- python-version: "3.11"
django-version: "django>=5.0.6,<5.1"
- python-version: "3.12"
django-version: "django>=5.0.6,<5.1"
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: '${{ matrix.python-version }}'
- name: Install the project
run: |
uv sync --all-extras --dev
uv add '${{ matrix.django-version }}; python_version == "${{ matrix.python-version }}"'
- name: Run tests
id: test
run: |
uv run python -m django --version
uv run pytest