mirror of
https://github.com/jazzband/django-analytical.git
synced 2026-05-05 06:04:44 +00:00
Test against Django 3.0, Python 3.8
Modernize Travis CI setup
This commit is contained in:
parent
011e7d35ff
commit
3943747d5d
3 changed files with 42 additions and 34 deletions
44
.travis.yml
44
.travis.yml
|
|
@ -1,29 +1,17 @@
|
|||
os: linux
|
||||
dist: xenial
|
||||
sudo: true
|
||||
|
||||
language: python
|
||||
python:
|
||||
- 2.7
|
||||
- 3.4
|
||||
- 3.5
|
||||
- 3.6
|
||||
- 3.7
|
||||
- 3.8
|
||||
|
||||
env:
|
||||
- DJANGO=1.11
|
||||
- DJANGO=2.1
|
||||
- DJANGO=2.2
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- env: TOXENV=bandit
|
||||
exclude:
|
||||
# Python/Django combinations that aren't officially supported
|
||||
- { env: DJANGO=1.11, python: 3.7 }
|
||||
- { env: DJANGO=2.1, python: 2.7 }
|
||||
- { env: DJANGO=2.1, python: 3.4 }
|
||||
- { env: DJANGO=2.2, python: 2.7 }
|
||||
- { env: DJANGO=2.2, python: 3.4 }
|
||||
- DJANGO=3.0
|
||||
|
||||
install:
|
||||
- pip install tox-travis
|
||||
|
|
@ -36,22 +24,32 @@ stages:
|
|||
- deploy
|
||||
|
||||
jobs:
|
||||
allow_failures:
|
||||
- env: TOXENV=bandit
|
||||
include:
|
||||
- { stage: lint, env: TOXENV=flake8, python: 3.7 }
|
||||
- { stage: lint, env: TOXENV=bandit, python: 3.7 }
|
||||
- { stage: lint, env: TOXENV=readme, python: 3.7 }
|
||||
- { stage: lint, python: 3.7, env: TOXENV=flake8 }
|
||||
- { stage: lint, python: 3.7, env: TOXENV=bandit }
|
||||
- { stage: lint, python: 3.7, env: TOXENV=readme }
|
||||
- { stage: test, python: 2.7, env: DJANGO=1.11 }
|
||||
exclude:
|
||||
# Python/Django combinations that aren't officially supported
|
||||
- { stage: test, python: 3.4, env: DJANGO=2.2 }
|
||||
- { stage: test, python: 3.4, env: DJANGO=3.0 }
|
||||
- { stage: test, python: 3.5, env: DJANGO=3.0 }
|
||||
- { stage: test, python: 3.8, env: DJANGO=1.11 }
|
||||
- stage: deploy
|
||||
env:
|
||||
python: 3.7
|
||||
install: skip
|
||||
script: skip
|
||||
if: tag is present
|
||||
deploy:
|
||||
provider: pypi
|
||||
server: https://jazzband.co/projects/django-analytical/upload
|
||||
distributions: sdist bdist_wheel
|
||||
user: jazzband
|
||||
username: jazzband
|
||||
password:
|
||||
secure: JCr5hRjAeXuiISodCJf8HWd4BTJMpl2eiHI8NciPaSM9WwOOeUXxmlcP8+lWlXxgM4BYUC/O7Q90fkwj5x06n+z4oyJSEVerTvCDcpeZ68KMMG1tR1jTbHcxfEKoEvcs2J0fThJ9dIMtfbtUbIpzusJHkZPjsIy8HAJDw8knnJs=
|
||||
on:
|
||||
tags: true
|
||||
repo: jazzband/django-analytical
|
||||
env:
|
||||
install: skip
|
||||
script: skip
|
||||
python: 3.7
|
||||
|
|
|
|||
3
setup.py
3
setup.py
|
|
@ -76,8 +76,8 @@ setup(
|
|||
'Environment :: Web Environment',
|
||||
'Framework :: Django',
|
||||
'Framework :: Django :: 1.11',
|
||||
'Framework :: Django :: 2.1',
|
||||
'Framework :: Django :: 2.2',
|
||||
'Framework :: Django :: 3.0',
|
||||
'Intended Audience :: Developers',
|
||||
'License :: OSI Approved :: MIT License',
|
||||
'Operating System :: OS Independent',
|
||||
|
|
@ -91,6 +91,7 @@ setup(
|
|||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
],
|
||||
platforms=['any'],
|
||||
url='https://github.com/jazzband/django-analytical',
|
||||
|
|
|
|||
29
tox.ini
29
tox.ini
|
|
@ -1,8 +1,9 @@
|
|||
[tox]
|
||||
envlist =
|
||||
# Python/Django combinations that are officially supported
|
||||
py{27,34,35,36}-django111
|
||||
py{35,36,37}-django{21,22}
|
||||
py{27,34,35,36,37}-django111
|
||||
py{35,36,37,38}-django22
|
||||
py{36,37,38}-django30
|
||||
flake8
|
||||
bandit
|
||||
readme
|
||||
|
|
@ -10,40 +11,48 @@ envlist =
|
|||
clean
|
||||
|
||||
[testenv]
|
||||
commands =
|
||||
coverage run setup.py test
|
||||
sh -c 'coveralls | true'
|
||||
description = Unit tests
|
||||
deps =
|
||||
coverage
|
||||
coveralls
|
||||
django111: Django>=1.11,<2.0
|
||||
django21: Django>=2.1,<2.2
|
||||
django22: Django>=2.2,<3.0
|
||||
django30: Django>=3.0,<3.1
|
||||
commands =
|
||||
coverage run setup.py test
|
||||
sh -c 'coveralls | true'
|
||||
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
|
||||
whitelist_externals = sh
|
||||
|
||||
[testenv:bandit]
|
||||
deps = bandit
|
||||
description = PyCQA security linter
|
||||
deps = bandit<1.6
|
||||
commands = bandit -r --ini tox.ini
|
||||
|
||||
[testenv:clean]
|
||||
deps = pyclean
|
||||
description = Clean up bytecode and build artifacts
|
||||
deps =
|
||||
commands =
|
||||
py3clean -v {toxinidir}
|
||||
rm -rf .tox/ django_analytical.egg-info/ build/ dist/ docs/_build/
|
||||
find {toxinidir} -type f -name '*.pyc' -delete
|
||||
find {toxinidir} -type d -name '__pycache__' -delete
|
||||
whitelist_externals =
|
||||
find
|
||||
rm
|
||||
|
||||
[testenv:docs]
|
||||
description = Build the HTML documentation
|
||||
deps = sphinx
|
||||
commands = sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
|
||||
whitelist_externals = make
|
||||
|
||||
[testenv:flake8]
|
||||
description = Static code analysis and code style
|
||||
deps = flake8
|
||||
commands = flake8
|
||||
|
||||
[testenv:readme]
|
||||
description = Ensure README renders on PyPI
|
||||
deps = twine
|
||||
commands =
|
||||
{envpython} setup.py -q sdist bdist_wheel
|
||||
|
|
@ -52,8 +61,8 @@ commands =
|
|||
[travis:env]
|
||||
DJANGO =
|
||||
1.11: django111
|
||||
2.1: django21
|
||||
2.2: django22
|
||||
3.0: django30
|
||||
|
||||
[bandit]
|
||||
exclude = .cache,.git,.tox,build,dist,docs,tests
|
||||
|
|
|
|||
Loading…
Reference in a new issue