Skip to content

Commit 5ebbd15

Browse files
committed
Add Python-Django compatibility matrix to tox config;
test Django 2.0 also.
1 parent 939bbde commit 5ebbd15

File tree

3 files changed

+24
-12
lines changed

3 files changed

+24
-12
lines changed

.travis.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,20 @@ env:
1717
- TOXENV=py34-django19
1818
- TOXENV=py34-django110
1919
- TOXENV=py34-django111
20+
- TOXENV=py34-django20
2021

2122
- TOXENV=py35-django18
2223
- TOXENV=py35-django19
2324
- TOXENV=py35-django110
2425
- TOXENV=py35-django111
26+
- TOXENV=py35-django20
2527

2628
matrix:
2729
include:
28-
- python: 3.6
29-
env: TOXENV=py36-django110
3030
- python: 3.6
3131
env: TOXENV=py36-django111
32+
- python: 3.6
33+
env: TOXENV=py36-django20
3234
- python: 3.4 # i.e. skip installing 3.5
3335
env: TOXENV=lint
3436
- python: 3.4

Makefile

+12-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@
44
help:
55
@echo "\nAvailable commands:\n\n $(shell sed -n 's/^.PHONY:\(.*\)/ *\1\\n/p' Makefile)"
66

7-
.PHONY: test # runs tests using detox, combines coverage and reports it
7+
.PHONY: test # runs tests
88
test:
9+
coverage run setup.py test
10+
11+
.PHONY: test_all # runs tests using detox, combines coverage and reports it
12+
test_all:
913
detox
10-
coverage combine
14+
make coverage
15+
16+
.PHONY: coverage # combines coverage and reports it
17+
coverage:
18+
coverage combine || true
1119
coverage report
1220

1321
.PHONY: lint # runs flake8
@@ -34,5 +42,5 @@ example:
3442
clean:
3543
rm -rf dist/ *.egg *.egg-info .coverage .coverage.* example/db.sqlite3
3644

37-
.PHONY: all # runs clean, test, lint
38-
all: clean test lint
45+
.PHONY: all # runs clean, test_all, lint
46+
all: clean test_all lint

tox.ini

+8-6
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,22 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py{34,35}-django{18,19,110,111}
8-
py36-django{110,111}
7+
envlist = py34-django{ 18, 19, 110, 111, 20 },
8+
py35-django{ 18, 19, 110, 111, 20 },
9+
py36-django{ 111, 20 }
910

1011

1112
[testenv]
1213
passenv = COVERAGE_FILE
1314
commands =
14-
coverage run setup.py test
15+
make test
1516
install_command =
1617
pip install --no-binary --pre {opts} {packages}
1718
deps = django18: Django>=1.8,<1.9
1819
django19: Django>=1.9,<1.10
1920
django110: Django>=1.10,<1.11
2021
django111: Django>=1.11b1,<1.12
22+
django20: Django>=2.0b1,<2.1
2123
coverage
2224

2325

@@ -28,15 +30,15 @@ skip_install = true
2830
passenv = COVERAGE_FILE
2931
basepython = python3.4
3032
commands =
31-
coverage combine
32-
coverage report
33+
make coverage
3334
deps =
3435
coverage
3536

3637

3738
[testenv:lint]
39+
basepython = python3.4
3840
skip_install = true
3941
commands =
40-
flake8
42+
make lint
4143
deps =
4244
flake8

0 commit comments

Comments
 (0)