Skip to content

Commit 9995a95

Browse files
committed
Add django to unit test build matrix
1 parent d1b29ba commit 9995a95

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/unit_tests.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525
strategy:
2626
matrix:
2727
python: ["3.10", "3.11", "3.12", "3.13"]
28+
django: [0, "5.2"] # add more versions as we add support
29+
# exclude incompatible python+django combinations if needed
30+
# OR limit django+python to specific combinations to avoid too many builds
2831
defaults:
2932
run:
3033
working-directory: .
@@ -40,8 +43,11 @@ jobs:
4043
cache: 'pip'
4144
cache-dependency-path: '**/pyproject.toml'
4245

43-
- name: Install package with dependencies
44-
run: pip install -e ".[test]"
46+
# test with and without django based on build matrix
47+
- name: Install package with dependencies (and optionally django)
48+
run: |
49+
if [ "${{ matrix.django }}" -gt "0"]; then pip install -q Django==${{ matrix.django }} pytest-django; fi
50+
pip install -e '.[test]'
4551
4652
# for all versions but the one we use for code coverage, run normally
4753
- name: Run unit tests without code coverage

0 commit comments

Comments
 (0)