Skip to content

Commit 4e874d8

Browse files
committed
Add Django 2.2 to the test matrix
Remove all officially unsupported Python+Django combinations Add Bandit check, add Codacy badge Add docs target in Tox configuration Use build stages with Travis CI
1 parent 4a07cb3 commit 4e874d8

File tree

4 files changed

+74
-50
lines changed

4 files changed

+74
-50
lines changed

.bandit

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tox.ini

.travis.yml

+42-31
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,50 @@
11
language: python
2-
cache: pip
3-
42
python:
5-
- 2.7
6-
- 3.4
7-
- 3.5
8-
- 3.6
3+
- 2.7
4+
- 3.4
5+
- 3.5
6+
- 3.6
7+
- 3.7
8+
99
env:
10-
- DJANGO=1.7
11-
- DJANGO=1.8
12-
- DJANGO=1.9
13-
- DJANGO=1.10
14-
- DJANGO=1.11
15-
- DJANGO=2.0
16-
- DJANGO=2.1
10+
- DJANGO=1.11
11+
- DJANGO=2.1
12+
- DJANGO=2.2
13+
1714
matrix:
1815
exclude:
19-
# Python/Django combinations that aren't officially supported
20-
- { python: 3.5, env: DJANGO=1.7 }
21-
- { python: 3.6, env: DJANGO=1.7 }
22-
- { python: 3.6, env: DJANGO=1.8 }
23-
- { python: 3.6, env: DJANGO=1.9 }
24-
- { python: 3.6, env: DJANGO=1.10 }
25-
- { python: 2.7, env: DJANGO=2.0 }
26-
- { python: 2.7, env: DJANGO=2.1 }
27-
- { python: 3.4, env: DJANGO=2.1 }
28-
include:
29-
- { python: 3.6, env: TOXENV=flake8 }
30-
- { python: 3.6, env: TOXENV=readme, dist: xenial } # requires sqlite3>=3.8.3 which is not in trusty
31-
# Work around Travis Python 3.7 issue: https://github.com/travis-ci/travis-ci/issues/9815
32-
- { python: 3.7, env: DJANGO=1.11, dist: xenial, sudo: true }
33-
- { python: 3.7, env: DJANGO=2.0, dist: xenial, sudo: true }
34-
- { python: 3.7, env: DJANGO=2.1, dist: xenial, sudo: true }
16+
# Python/Django combinations that aren't officially supported
17+
- { env: DJANGO=1.11, python: 3.7 }
18+
- { env: DJANGO=2.1, python: 2.7 }
19+
- { env: DJANGO=2.1, python: 3.4 }
20+
- { env: DJANGO=2.2, python: 2.7 }
21+
- { env: DJANGO=2.2, python: 3.4 }
3522

3623
install:
37-
- pip install tox-travis
24+
- pip install tox-travis
3825
script:
39-
- tox
26+
- tox
27+
28+
stages:
29+
- lint
30+
- test
31+
- deploy
32+
33+
jobs:
34+
include:
35+
- { stage: lint, env: TOXENV=flake8, python: 3.7 }
36+
- { stage: lint, env: TOXENV=bandit, python: 3.7 }
37+
- { stage: lint, env: TOXENV=readme, python: 3.7 }
38+
- stage: deploy
39+
env:
40+
python: 3.7
41+
install: skip
42+
script: skip
43+
deploy:
44+
provider: pypi
45+
distributions: sdist bdist_wheel
46+
user: bittner
47+
password:
48+
secure: JrgKNLiONVUmfg+Vt9NxDccXl9DbPqbXq8xfMY4tFb6CfRWCESgt26wPORyFJvP3FB9yvKXRL5Lb5AFWroTM+h1zlsdHmvEnSP4ldSVU8a2U35lqjZgN9lhViYtn2rt+wcvdWToBAAZolHKRzUoElVCHMt5kBQBSI1oSmNfCn6k=
49+
on:
50+
tags: true

README.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ an asynchronous version of the Javascript code if possible.
3232
.. |coveralls| image:: https://coveralls.io/repos/jazzband/django-analytical/badge.svg
3333
:alt: Test coverage
3434
:target: https://coveralls.io/r/jazzband/django-analytical
35-
.. |health| image:: https://landscape.io/github/jazzband/django-analytical/master/landscape.svg?style=flat
36-
:target: https://landscape.io/github/jazzband/django-analytical/master
35+
.. |health| image:: https://img.shields.io/codacy/grade/********************/master.svg
36+
:target: https://www.codacy.com/app/jazzband/django-analytical
3737
:alt: Code health
3838
.. |python-support| image:: https://img.shields.io/pypi/pyversions/django-analytical.svg
3939
:target: https://pypi.python.org/pypi/django-analytical

tox.ini

+29-17
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
[tox]
22
envlist =
33
# Python/Django combinations that are officially supported
4-
py{27,34}-django17
5-
py{27,34,35}-django18
6-
py{27,34,35}-django19
7-
py{27,34,35}-django110
8-
py{27,34,35,36,37}-django111
9-
py{34,35,36,37}-django20
10-
py{35,36,37}-django21
4+
py{27,34,35,36}-django111
5+
py{35,36,37}-django{21,22}
116
flake8
7+
bandit
128
readme
9+
docs
10+
clean
1311

1412
[testenv]
1513
commands =
@@ -18,16 +16,30 @@ commands =
1816
deps =
1917
coverage
2018
coveralls
21-
django17: Django>=1.7,<1.8
22-
django18: Django>=1.8,<1.9
23-
django19: Django>=1.9,<1.10
24-
django110: Django>=1.10,<1.11
2519
django111: Django>=1.11,<2.0
26-
django20: Django>=2.0,<2.1
2720
django21: Django>=2.1,<2.2
21+
django22: Django>=2.2,<3.0
2822
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
2923
whitelist_externals = sh
3024

25+
[testenv:bandit]
26+
deps = bandit
27+
commands = bandit -r --ini tox.ini
28+
29+
[testenv:clean]
30+
deps = pyclean
31+
commands =
32+
rm -rf .tox/ django_analytical.egg-info/ build/ dist/ docs/_build/
33+
py3clean -v {toxinidir}
34+
whitelist_externals =
35+
rm
36+
37+
[testenv:docs]
38+
deps = sphinx
39+
changedir = docs
40+
commands = make html
41+
whitelist_externals = make
42+
3143
[testenv:flake8]
3244
deps = flake8
3345
commands = flake8
@@ -40,13 +52,13 @@ commands =
4052

4153
[travis:env]
4254
DJANGO =
43-
1.7: django17
44-
1.8: django18
45-
1.9: django19
46-
1.10: django110
4755
1.11: django111
48-
2.0: django20
4956
2.1: django21
57+
2.2: django22
58+
59+
[bandit]
60+
exclude = .cache,.git,.tox,build,dist,docs,tests
61+
targets = .
5062

5163
[flake8]
5264
exclude = .cache,.git,.tox,build,dist

0 commit comments

Comments
 (0)