Skip to content

Commit 29e411e

Browse files
committed
feat: #73 support Django 6
1 parent 813fe3e commit 29e411e

File tree

3 files changed

+261
-200
lines changed

3 files changed

+261
-200
lines changed

.github/workflows/pr-check.yml

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,43 @@ 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:
1038
runs-on: ubuntu-latest
1139
strategy:
1240
matrix:
1341
python-version: [3.11, 3.12, 3.13, 3.14]
42+
django-versions: [5.0, 6.0]
43+
exclude:
44+
- python-version: '3.11'
45+
django-versions: 6.0
1446
steps:
1547
- name: Checkout code
1648
uses: actions/checkout@v6
@@ -22,9 +54,18 @@ jobs:
2254
run: |
2355
curl -sSL https://install.python-poetry.org | python3 -
2456
echo "$HOME/.local/bin" >> $GITHUB_PATH
57+
- name: Cache Poetry dependencies
58+
uses: actions/cache@v4
59+
with:
60+
path: |
61+
~/.cache/pypoetry
62+
.venv
63+
key: poetry-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'poetry.lock') }}
64+
restore-keys: |
65+
poetry-${{ runner.os }}-py${{ matrix.python-version }}-
2566
- name: Install dependencies
2667
run: make dev-install
27-
- name: Run pre-commit
28-
run: make pre-commit
68+
- name: Set Django version
69+
run: pip install "Django==${{ matrix.django-versions }}"
2970
- name: Run tests
3071
run: make test

0 commit comments

Comments
 (0)