Skip to content

Commit 4eaf14c

Browse files
authored
feat: add Django 3 test support (#106)
Django 3.0 is out: https://docs.djangoproject.com/en/3.0/releases/3.0/ Let's see if we're compatible. It turns out no code changes are needed huzzah!
1 parent 9169f0d commit 4eaf14c

File tree

4 files changed

+23
-4
lines changed

4 files changed

+23
-4
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ jobs:
5454
- stage: test
5555
python: 3.7
5656
env: TOX_ENV=django22-py37
57+
- stage: test
58+
python: 3.6
59+
env: TOX_ENV=django30-py36
60+
- stage: test
61+
python: 3.7
62+
env: TOX_ENV=django30-py37
63+
- stage: test
64+
python: 3.8
65+
env: TOX_ENV=django30-py38
5766
- stage: lint
5867
install: pip install black
5968
script: black --check .

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,19 @@ resetdb: ## Delete and then recreate the dev sqlite database
5353
python $(MANAGE) loaddata sample_data
5454

5555
docker/build: ## Build a full set of Docker images
56-
docker/build: docker/build/2.2.6 docker/build/2.1.13 docker/build/2.0.13 docker/build/1.11.25 docker/build/1.10.8 docker/build/1.9.13 docker/build/1.8.18
56+
docker/build: docker/build/3.0 docker/build/2.2.6 docker/build/2.1.13 docker/build/2.0.13 docker/build/1.11.25 docker/build/1.10.8 docker/build/1.9.13 docker/build/1.8.18
5757

5858
docker/build/%:
5959
docker build --build-arg DJANGO_VERSION=$* \
6060
-t $(IMAGE):$$(echo "$*" | cut -f 1-2 -d.) .
6161

62-
run: run/2.2
62+
run: run/3.0
6363

6464
run/%:
6565
docker run --rm -p 8000:8000 -it $(IMAGE):$*
6666

6767
docker/publish: ## Publish Docker images to the hub
68+
docker push $(IMAGE):3.0
6869
docker push $(IMAGE):2.2
6970
docker push $(IMAGE):2.1
7071
docker push $(IMAGE):2.0
@@ -77,7 +78,7 @@ test/%:
7778
docker run --rm -p 8000:8000 -t $(IMAGE):$* make test
7879

7980
bash:
80-
docker run --rm -it $(IMAGE):2.2 /bin/sh
81+
docker run --rm -it $(IMAGE):3.0 /bin/sh
8182

8283
.PHONY: version
8384
version:
@@ -92,7 +93,7 @@ version:
9293
# 3. `make release`
9394
# 4. `git push --follow-tags origin master`
9495
# 5. `chandler push`
95-
# 6. `make build docker/publish`
96+
# 6. `make docker/build docker/publish`
9697
release: clean
9798
@-pip install twine wheel > /dev/null
9899
python setup.py sdist bdist_wheel

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class ArticleAdmin(DjangoObjectActions, admin.ModelAdmin):
3333
change_actions = ('publish_this', )
3434
```
3535

36+
3637
Usage
3738
-----
3839

@@ -189,6 +190,12 @@ Limitations
189190
security is planned for the future.
190191

191192

193+
Python and Django compatibility
194+
-------------------------------
195+
196+
See [`tox.ini`](./tox.ini) for which Python and Django versions this supports.
197+
198+
192199
Demo Admin & Docker images
193200
--------------------------
194201

tox.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ envlist =
99
django20-{py34,py35,py36,py37},
1010
django21-{py35,py36,py37},
1111
django22-{py36,py37},
12+
django30-{py36,py37,py38},
1213
# run one of the tests again but with coverage
1314
coveralls-django21-py37,
1415
skipsdist = True
@@ -27,6 +28,7 @@ deps =
2728
django20: Django<2.1
2829
django21: Django<2.2
2930
django22: Django<2.3
31+
django30: Django<3.1
3032

3133
[testenv:coveralls-django21-py37]
3234
commands =

0 commit comments

Comments
 (0)