Add py3-django111 testing combination
Tests are also now run in parallel using detox and pytest-xdist.
This commit is contained in:
+4
-1
@@ -1,6 +1,8 @@
|
||||
[run]
|
||||
source = drf_yasg
|
||||
branch = True
|
||||
parallel = true
|
||||
disable_warnings = module-not-measured
|
||||
|
||||
[report]
|
||||
# Regexes for lines to exclude from consideration
|
||||
@@ -29,7 +31,8 @@ exclude_lines =
|
||||
raise SwaggerGenerationError
|
||||
|
||||
ignore_errors = True
|
||||
precision = 0
|
||||
precision = 2
|
||||
show_missing = True
|
||||
|
||||
[paths]
|
||||
source =
|
||||
|
||||
+16
-8
@@ -2,31 +2,31 @@ language: python
|
||||
cache: pip
|
||||
|
||||
python:
|
||||
- '2.7'
|
||||
- '3.4'
|
||||
- '3.5'
|
||||
- '3.6'
|
||||
|
||||
env:
|
||||
- DRF=3.7 DJANGO=2.0
|
||||
- DRF=3.7
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: test
|
||||
python: '2.7'
|
||||
env: DRF=3.7 DJANGO=1.11
|
||||
python: '3.6'
|
||||
env: DRF=master
|
||||
-
|
||||
python: '3.5'
|
||||
env: TOXENV=docs
|
||||
-
|
||||
python: '2.7'
|
||||
env: TOXENV=lint
|
||||
-
|
||||
python: '3.6'
|
||||
env: DRF=master
|
||||
|
||||
- stage: publish
|
||||
python: '3.6'
|
||||
before_script: skip
|
||||
script: skip
|
||||
after_success: skip
|
||||
env:
|
||||
deploy: &pypi
|
||||
provider: pypi
|
||||
@@ -48,12 +48,20 @@ install:
|
||||
|
||||
before_script:
|
||||
- coverage erase
|
||||
- |
|
||||
[[ -z "$TOXENV" ]] && REPORT_COVERAGE="yes" || REPORT_COVERAGE="no";
|
||||
echo "Reporting coverage: ${REPORT_COVERAGE}"
|
||||
- |
|
||||
[[ -z "$TOXENV" && ! -z "$DRF" && "$DRF" != "master" ]] && USE_DETOX="yes" || USE_DETOX="no";
|
||||
echo "Using detox: ${USE_DETOX}"
|
||||
|
||||
script:
|
||||
- tox
|
||||
- 'if [[ "$USE_DETOX" == "yes" ]]; then detox; else tox; fi'
|
||||
|
||||
after_success:
|
||||
- codecov
|
||||
- coverage combine
|
||||
- 'if [[ "$REPORT_COVERAGE" == "yes" ]]; then coverage report; fi'
|
||||
- 'if [[ "$REPORT_COVERAGE" == "yes" ]]; then codecov; fi'
|
||||
|
||||
branches:
|
||||
only:
|
||||
|
||||
@@ -4,4 +4,3 @@
|
||||
-r lint.txt
|
||||
|
||||
tox-battery>=0.5
|
||||
detox>=0.11
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
pytest>=2.9
|
||||
pytest-pythonpath>=0.7.1
|
||||
pytest-cov>=2.5.1
|
||||
pytest-xdist>=1.22.0
|
||||
# latest pip version of pytest-django is more than a year old and does not support Django 2.0
|
||||
git+https://github.com/pytest-dev/pytest-django.git@94cccb956435dd7a719606744ee7608397e1eafb
|
||||
datadiff==2.0.0
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# requirements for building and running tox
|
||||
tox>=2.9.1
|
||||
detox>=0.11
|
||||
|
||||
-r setup.txt
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[tox]
|
||||
envlist =
|
||||
py27-django111-drf37,
|
||||
py{34,35,36}-django20-drf37,
|
||||
py{34,35,36}-django{111,20}-drf37,
|
||||
py36-drfmaster,
|
||||
lint, docs
|
||||
|
||||
@@ -9,9 +9,6 @@ envlist =
|
||||
DRF =
|
||||
3.7: drf37
|
||||
master: drfmaster
|
||||
DJANGO =
|
||||
1.11: django111
|
||||
2.0: django20
|
||||
|
||||
[testenv]
|
||||
deps =
|
||||
@@ -29,7 +26,7 @@ deps =
|
||||
-rrequirements/test.txt
|
||||
|
||||
commands =
|
||||
pytest --cov-config .coveragerc --cov-append --cov {posargs}
|
||||
pytest --cov --cov-config .coveragerc --cov-append --cov-report="" {posargs}
|
||||
|
||||
[testenv:py36-drfmaster]
|
||||
pip_pre = True
|
||||
@@ -51,6 +48,7 @@ commands =
|
||||
[pytest]
|
||||
DJANGO_SETTINGS_MODULE = testproj.settings.local
|
||||
python_paths = testproj
|
||||
addopts = -n 3
|
||||
|
||||
[flake8]
|
||||
max-line-length = 120
|
||||
|
||||
Reference in New Issue
Block a user