Skip to content

Commit e3a630c

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

3 files changed

Lines changed: 259 additions & 200 deletions

File tree

.github/workflows/pr-check.yml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,40 @@ 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]
1443
steps:
1544
- name: Checkout code
1645
uses: actions/checkout@v6
@@ -22,9 +51,19 @@ jobs:
2251
run: |
2352
curl -sSL https://install.python-poetry.org | python3 -
2453
echo "$HOME/.local/bin" >> $GITHUB_PATH
54+
- name: Cache Poetry dependencies
55+
uses: actions/cache@v4
56+
with:
57+
path: |
58+
~/.cache/pypoetry
59+
.venv
60+
key: poetry-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'poetry.lock') }}
61+
restore-keys: |
62+
poetry-${{ runner.os }}-py${{ matrix.python-version }}-
2563
- name: Install dependencies
2664
run: make dev-install
27-
- name: Run pre-commit
28-
run: make pre-commit
65+
- name: Set Django version
66+
if: ${{ !((matrix.python-version == '3.11') && (matrix.django-versions == '6.0')) }}
67+
run: pip install "Django==${{ matrix.django-versions }}"
2968
- name: Run tests
3069
run: make test

0 commit comments

Comments
 (0)