Skip to content

Commit aa3b6a0

Browse files
committed
work drf into version matrix in CI
1 parent bc3f17c commit aa3b6a0

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

.github/workflows/test.yml

+16-12
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ jobs:
1313
- '4.2' # LTS April 2026
1414
- '5.0' # April 2025
1515
- '5.1' # December 2025
16+
drf-version:
17+
- '3.14'
18+
- '3.15'
1619
exclude:
1720
- python-version: '3.8'
1821
django-version: '5.0'
@@ -34,6 +37,16 @@ jobs:
3437
django-version: '4.2'
3538
- python-version: '3.13.0-rc.1'
3639
django-version: '5.0'
40+
41+
- django-version: '3.2'
42+
drf-version: '3.15'
43+
- django-version: '4.2'
44+
drf-version: '3.14'
45+
- django-version: '5.0'
46+
drf-version: '3.14'
47+
- django-version: '5.1'
48+
drf-version: '3.14'
49+
3750
steps:
3851
- uses: actions/checkout@v4
3952
- name: Set up Python ${{ matrix.python-version }}
@@ -69,32 +82,23 @@ jobs:
6982
run: |
7083
poetry install -E djangorestframework
7184
poetry run pip install -U "Django~=${{ matrix.django-version }}"
72-
# Check if Django version is 4.2 or higher
73-
if [[ "${{ matrix.django-version }}" =~ ^4\.2|^4\.3 ]]; then
74-
poetry run pip install "djangorestframework<3.15.1"
75-
fi
85+
poetry run pip install -U "djangorestframework~=${{ matrix.drf-version }}"
7686
- name: Run Unit Tests w/ djangorestframework
7787
run: |
7888
poetry run pytest --cov-fail-under=30
7989
- name: Install django-filters
8090
run: |
8191
poetry install -E filters
8292
poetry run pip install -U "Django~=${{ matrix.django-version }}"
83-
# Check if Django version is 4.2 or higher
84-
if [[ "${{ matrix.django-version }}" =~ ^4\.2|^4\.3 ]]; then
85-
poetry run pip install "djangorestframework<3.15.1"
86-
fi
93+
poetry run pip install -U "djangorestframework~=${{ matrix.drf-version }}"
8794
- name: Run Unit Tests w/ django-filter
8895
run: |
8996
poetry run pytest --cov-fail-under=30
9097
- name: Install all deps
9198
run: |
9299
poetry install -E all
93100
poetry run pip install -U "Django~=${{ matrix.django-version }}"
94-
# Check if Django version is 4.2 or higher
95-
if [[ "${{ matrix.django-version }}" =~ ^4\.2|^4\.3 ]]; then
96-
poetry run pip install "djangorestframework<3.15.1"
97-
fi
101+
poetry run pip install -U "djangorestframework~=${{ matrix.drf-version }}"
98102
- name: Run Full Unit Tests
99103
run: |
100104
poetry run pytest

0 commit comments

Comments
 (0)