Restructure travis & tox configuration (#34)

Also removed useless python 3.7-dev build
openapi3
Cristi Vîjdea 2018-01-03 20:30:17 +01:00 committed by GitHub
parent fd099998ea
commit 917ccd1f56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 48 additions and 47 deletions

View File

@ -1,48 +1,25 @@
language: python language: python
cache: pip cache: pip
python: python:
- '2.7'
- '3.4' - '3.4'
- '3.5' - '3.5'
- '3.6' - '3.6'
- '3.7-dev'
env: env:
- DRF=3.7 - DRF=3.7 DJANGO=2.0
install:
- pip install -r requirements/ci.txt
before_script:
- coverage erase
script:
- tox
after_success:
- codecov
branches:
only:
- master
- /^release\/.*$/
- /^v?\d+\.\d+(\.\d+)?(-?\S+)?$/
notifications:
email:
on_success: always
on_failure: always
jobs: jobs:
fast_finish: true
include: include:
- stage: test - stage: test
python: '2.7'
env: DRF=3.7 DJANGO=1.11
-
python: '3.5' python: '3.5'
env: TOXENV=docs env: TOXENV=docs
- -
python: '2.7' python: '2.7'
env: TOXENV=flake8 env: TOXENV=lint
- -
python: '3.6' python: '3.6'
env: DRF=master env: DRF=master
@ -63,9 +40,34 @@ jobs:
allow_failures: allow_failures:
- env: TOXENV=flake8 - env: TOXENV=flake8
- env: DRF=master - env: DRF=master
- python: '3.7-dev'
fast_finish: true
install:
- pip install -r requirements/ci.txt
before_script:
- coverage erase
script:
- tox
after_success:
- codecov
branches:
only:
- master
- /^release\/.*$/
- /^v?\d+\.\d+(\.\d+)?(-?\S+)?$/
stages: stages:
- test - test
- name: publish - name: publish
if: tag IS present if: tag IS present
notifications:
email:
on_success: always
on_failure: always

View File

@ -3,8 +3,5 @@ tox>=2.9.1
tox-battery>=0.5 tox-battery>=0.5
detox>=0.11 detox>=0.11
isort>=4.2 -r lint.txt
flake8>=3.5.0
flake8-isort>=2.3
-r setup.txt -r setup.txt

View File

@ -0,0 +1,3 @@
isort>=4.2
flake8>=3.5.0
flake8-isort>=2.3

25
tox.ini
View File

@ -1,26 +1,26 @@
[tox] [tox]
envlist = envlist =
py27-drf37, py27-django111-drf37,
py{34,35,36,37}-drf37, py{34,35,36}-django20-drf37,
py36-drfmaster, py36-drfmaster,
flake8, docs lint, docs
[travis:env] [travis:env]
DRF = DRF =
3.7: drf37 3.7: drf37
master: drfmaster master: drfmaster
DJANGO =
1.11: django111
2.0: django20
[testenv] [testenv]
deps = deps =
django111: Django>=1.11,<2.0
django20: Django>=2.0,<2.1
drf37: djangorestframework>=3.7.3,<3.8 drf37: djangorestframework>=3.7.3,<3.8
# py27 is tested with Django <2.0 (Django 2.0 no longer supports python 2) # test with the latest build of Django and django-rest-framework to get early warning of compatibility issues
py27: Django>=1.11,<2.0
# main testing configurations
py{34,35,36,37}-drf37: Django>=1.11,<2.1
# py3 with the latest build of Django and django-rest-framework to get early warning of compatibility issues
drfmaster: https://github.com/encode/django-rest-framework/archive/master.tar.gz drfmaster: https://github.com/encode/django-rest-framework/archive/master.tar.gz
drfmaster: https://github.com/django/django/archive/master.tar.gz drfmaster: https://github.com/django/django/archive/master.tar.gz
@ -35,11 +35,10 @@ commands =
[testenv:py36-drfmaster] [testenv:py36-drfmaster]
pip_pre = True pip_pre = True
[testenv:flake8] [testenv:lint]
skip_install = true skip_install = true
deps = deps =
flake8 -rrequirements/lint.txt
flake8-isort
commands = commands =
flake8 src/drf_yasg testproj tests setup.py flake8 src/drf_yasg testproj tests setup.py