Skip to content

Commit 505d6ba

Browse files
authored
tests: start testing on Django 4.1 and main branch (#85)
1 parent 82f90a2 commit 505d6ba

File tree

3 files changed

+30
-5
lines changed

3 files changed

+30
-5
lines changed

.github/workflows/test.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,23 @@ on: [push, pull_request]
44

55
jobs:
66
unit-tests:
7+
# Runs for all supported Django/Python versions
78
runs-on: ${{ matrix.os }}
89
strategy:
910
fail-fast: false
1011
matrix:
1112
python-version: ['3.7', '3.8', '3.9', '3.10']
12-
django-version: ['2.2', '3.1', '3.2']
13+
django-version: ['2.2', '3.1', '3.2', '4.0']
1314
os: [
1415
ubuntu-20.04,
1516
]
17+
exclude:
18+
- python-version: '3.7'
19+
django-version: '4.0'
20+
- python-version: '3.10'
21+
django-version: '2.2'
22+
- python-version: '3.10'
23+
django-version: '3.1'
1624

1725
steps:
1826
- uses: actions/checkout@v1
@@ -24,7 +32,7 @@ jobs:
2432
- name: Install dependencies
2533
run: |
2634
python -m pip install --upgrade pip
27-
pip install django==${{ matrix.django-version }} coverage
35+
pip install Django==${{ matrix.django-version }} coverage
2836
python setup.py install
2937
3038
- name: Run coverage
@@ -33,12 +41,18 @@ jobs:
3341
- name: Upload Coverage to Codecov
3442
uses: codecov/codecov-action@v1
3543

36-
unit-tests-dj4:
44+
45+
unit-tests-future-versions:
46+
# Runs for all Django/Python versions which are not yet supported
3747
runs-on: ${{ matrix.os }}
3848
strategy:
3949
fail-fast: false
4050
matrix:
4151
python-version: ['3.8', '3.9', '3.10']
52+
django-version: [
53+
'Django==4.1',
54+
'https://github.com/django/django/archive/main.tar.gz'
55+
]
4256
os: [
4357
ubuntu-20.04,
4458
]
@@ -53,11 +67,12 @@ jobs:
5367
- name: Install dependencies
5468
run: |
5569
python -m pip install --upgrade pip
56-
pip install "django>=4.0,<4.1" coverage
70+
pip install ${{ matrix.django-version }} coverage
5771
python setup.py install
5872
5973
- name: Run coverage
6074
run: coverage run setup.py test
75+
continue-on-error: true
6176

6277
- name: Upload Coverage to Codecov
6378
uses: codecov/codecov-action@v1

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Changelog
55
unreleased
66
==========
77

8+
* Start testing Django 4.1 and Django's `main` branch
9+
810
3.0.1 2022-02-01
911
================
1012

tox.ini

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ envlist =
33
flake8
44
isort
55
py{37,38,39}-dj{22,31,32}
6-
py{38,39,310}-dj{31,32,40}
6+
py{38,39,310}-dj{31,32,40,41,main}
77

88
skip_missing_interpreters=True
99

@@ -14,11 +14,19 @@ deps =
1414
dj31: Django>=3.1,<3.2
1515
dj32: Django>=3.2,<3.3
1616
dj40: Django>=4.0,<4.1
17+
dj41: Django>=4.1,<4.2
18+
djmain: https://github.com/django/django/archive/main.tar.gz
1719
commands =
1820
{envpython} --version
1921
{env:COMMAND:coverage} erase
2022
{env:COMMAND:coverage} run setup.py test
2123
{env:COMMAND:coverage} report
24+
ignore_outcome =
25+
dj41: True
26+
djmain: True
27+
ignore_errors =
28+
dj41: True
29+
djmain: True
2230

2331
[testenv:flake8]
2432
deps = flake8

0 commit comments

Comments
 (0)