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