Skip to content

Commit 306b3c4

Browse files
committed
feat: #73 support Django 6
1 parent 813fe3e commit 306b3c4

File tree

3 files changed

+262
-200
lines changed

3 files changed

+262
-200
lines changed

.github/workflows/pr-check.yml

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,44 @@ on:
66
types: [opened, synchronize, reopened, updated]
77

88
jobs:
9+
pre-commit:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v6
15+
- name: Set up Python
16+
uses: actions/setup-python@v6
17+
with:
18+
python-version: 3.12
19+
- name: Install Poetry
20+
run: |
21+
curl -sSL https://install.python-poetry.org | python3 -
22+
echo "$HOME/.local/bin" >> $GITHUB_PATH
23+
- name: Cache Poetry dependencies
24+
uses: actions/cache@v4
25+
with:
26+
path: |
27+
~/.cache/pypoetry
28+
.venv
29+
key: poetry-${{ runner.os }}-py3.12-${{ hashFiles('pyproject.toml', 'poetry.lock') }}
30+
restore-keys: |
31+
poetry-${{ runner.os }}-py3.12-
32+
- name: Install dependencies
33+
run: make dev-install
34+
- name: Run pre-commit
35+
run: make pre-commit
36+
937
test:
38+
name: Test (Python ${{ matrix.python-version }}, Django ${{ matrix.django-versions }})
1039
runs-on: ubuntu-latest
1140
strategy:
1241
matrix:
1342
python-version: [3.11, 3.12, 3.13, 3.14]
43+
django-versions: [5.0, 6.0]
44+
exclude:
45+
- python-version: '3.11'
46+
django-versions: 6.0
1447
steps:
1548
- name: Checkout code
1649
uses: actions/checkout@v6
@@ -22,9 +55,18 @@ jobs:
2255
run: |
2356
curl -sSL https://install.python-poetry.org | python3 -
2457
echo "$HOME/.local/bin" >> $GITHUB_PATH
58+
- name: Cache Poetry dependencies
59+
uses: actions/cache@v4
60+
with:
61+
path: |
62+
~/.cache/pypoetry
63+
.venv
64+
key: poetry-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'poetry.lock') }}
65+
restore-keys: |
66+
poetry-${{ runner.os }}-py${{ matrix.python-version }}-
2567
- name: Install dependencies
2668
run: make dev-install
27-
- name: Run pre-commit
28-
run: make pre-commit
69+
- name: Set Django version
70+
run: pip install "Django==${{ matrix.django-versions }}"
2971
- name: Run tests
3072
run: make test

0 commit comments

Comments
 (0)