Update after merge.
This commit is contained in:
parent
9880fd82cc
commit
242ea8b60b
12
.travis.yml
12
.travis.yml
|
@ -24,18 +24,18 @@ env:
|
|||
matrix:
|
||||
include:
|
||||
- python: 2.7
|
||||
env: TOXENV=py27-coverage-posix,codecov-publish
|
||||
env: TOXENV=py27-alldeps-withcov-posix,codecov-publish
|
||||
# FIXME: https://twistedmatrix.com/trac/ticket/8633
|
||||
# Coverage should also be reported for nomodules tests so that we also
|
||||
# get report for those conditional branches.
|
||||
- python: 2.7
|
||||
env: TOXENV=py27-nomodules-posix
|
||||
env: TOXENV=py27-nodeps-withcov-posix,codecov-publish
|
||||
- python: 3.3
|
||||
env: TOXENV=py33-coverage-posix,codecov-publish
|
||||
env: TOXENV=py33-alldeps-withcov-posix,codecov-publish
|
||||
- python: 3.4
|
||||
env: TOXENV=py34-coverage-posix,codecov-publish
|
||||
env: TOXENV=py34-alldeps-withcov-posix,codecov-publish
|
||||
- python: 3.5
|
||||
env: TOXENV=py35-coverage-posix,codecov-publish
|
||||
env: TOXENV=py35-alldeps-withcov-posix,codecov-publish
|
||||
# For now all non-trial tests are in a single job to reduce the time spent
|
||||
# on starting separate jobs.
|
||||
- python: 2.7
|
||||
|
@ -55,7 +55,7 @@ matrix:
|
|||
# see: https://docs.travis-ci.com/user/languages/objective-c/#Supported-OS-X-iOS-SDK-versions
|
||||
osx_image: xcode7.1
|
||||
python: 2.7
|
||||
env: TOXENV=py27-coverage-posix,codecov-publish
|
||||
env: TOXENV=py27-alldeps-withcov-posix,codecov-publish
|
||||
|
||||
allow_failures:
|
||||
# For now, OSX run on Travis-CI has a few failures.
|
||||
|
|
|
@ -37,11 +37,11 @@ environment:
|
|||
- PYTHON_HOME: C:\\Python27-x64
|
||||
PYTHON_VERSION: "2.7"
|
||||
PYTHON_ARCH: "64"
|
||||
TOXENV: py27-coverage-windows,codecov-publish
|
||||
TOXENV: py27-alldeps-withcov-windows,codecov-publish
|
||||
- PYTHON_HOME: C:\\PYTHON35-x64
|
||||
PYTHON_VERSION: "3.5"
|
||||
PYTHON_ARCH: "64"
|
||||
TOXENV: py35-coverage-windows,codecov-publish
|
||||
TOXENV: py35-alldeps-withcov-windows,codecov-publish
|
||||
# The --reactor flag to trial doesn't work on Windows Python 3
|
||||
# so we can only choose the default reactor here:
|
||||
# https://twistedmatrix.com/trac/ticket/8745
|
||||
|
|
52
tox.ini
52
tox.ini
|
@ -1,5 +1,15 @@
|
|||
; tox configuration file for running tests similar to buildbot builders.
|
||||
;
|
||||
; The main trial based environments are defined based on a set of tags. Each
|
||||
; tag will trigger a different behavior. Multiple tags can be set for the same environment:
|
||||
;
|
||||
; * alldeps - install all possible dependencies
|
||||
; * nodeps - avoid installing any dependency,
|
||||
; * withcov - run the tests wrapped using the coverage.
|
||||
; * nocov - run the tests directly, without using the coverage wrapper.
|
||||
; * posix - prepare the tests to be run in a Linux/Unix/OSX environment.
|
||||
; * windows - prepare the tests to be executed under Windows.
|
||||
;
|
||||
; There is a non-default `codecov-publish` environment used to publish the
|
||||
; coverage results to codecov.io. It should be called after running the
|
||||
; standard coverage environment.
|
||||
|
@ -11,9 +21,7 @@
|
|||
skip_missing_interpreters=True
|
||||
toxworkdir=build/
|
||||
envlist=
|
||||
{py27,py33,py34,py35}-allmodules-{withcoverage,nocoverage}-posix
|
||||
py27-allmodules-{withcoverage,nocoverage}-windows,
|
||||
py27-nomodules-withcoverage,
|
||||
{py27,py33,py34,py35}-{alldeps,nodeps}-{withcov,nocov}-{posix,windows}
|
||||
pyflakes,twistedchecker,apidocs,narrativedocs,topfile,manifest-checker
|
||||
|
||||
[testenv]
|
||||
|
@ -39,16 +47,29 @@ deps =
|
|||
|
||||
withcoverage: coverage
|
||||
|
||||
codecov-publish: codecov
|
||||
|
||||
; Code quality checkers
|
||||
pyflakes: pyflakes
|
||||
twistedchecker: twistedchecker
|
||||
pyflakes{,3}: pyflakes
|
||||
manifest-checker: check-manifest
|
||||
|
||||
{twistedchecker,txchecker}: twistedchecker>=0.6.0
|
||||
txchecker: diff_cover
|
||||
|
||||
; Documentation
|
||||
apidocs: pydoctor
|
||||
narrativedocs: sphinx
|
||||
|
||||
; All environment variables are passed.
|
||||
passenv = *
|
||||
|
||||
setenv =
|
||||
# Enable sub-processes coverage reports and store coverage reports in a
|
||||
# known location.
|
||||
COVERAGE_PROCESS_START = {toxinidir}/.coveragerc
|
||||
COVERAGE_FILE = {toxinidir}/.coverage
|
||||
# Help tests know where the base directory is.
|
||||
TOX_INI_DIR = {toxinidir}
|
||||
|
||||
commands =
|
||||
#
|
||||
|
@ -64,31 +85,19 @@ commands =
|
|||
py27-{tests,coverage}: pip install --no-deps epydoc pydoctor
|
||||
apidocs: pip install --no-deps epydoc pydoctor
|
||||
|
||||
{tests,nomodules}: python -m twisted.trial --reactor={env:TWISTED_REACTOR:default} --reporter={env:TRIAL_REPORTER:verbose} {posargs:twisted}
|
||||
# Run tests without wrapping them using coverage.
|
||||
nocoverage: python -m twisted.trial --reactor={env:TWISTED_REACTOR:default} --reporter={env:TRIAL_REPORTER:verbose} {posargs:twisted}
|
||||
|
||||
# Run the tests wrapped using coverage.
|
||||
coverage: python {toxinidir}/admin/_copy.py {toxinidir}/admin/zz_coverage.pth {envsitepackagesdir}/zz_coverage.pth
|
||||
coverage: coverage erase
|
||||
coverage: coverage run -p --rcfile={toxinidir}/.coveragerc -m twisted.trial --reactor={env:TWISTED_REACTOR:default} --reporter={env:TRIAL_REPORTER:verbose} {posargs:twisted}
|
||||
|
||||
# Publish the coverage reports to codecov.io
|
||||
codecov-publish: coverage combine
|
||||
codecov-publish: coverage xml -o coverage.xml -i
|
||||
codecov-publish: codecov {env:CODECOV_OPTIONS:}
|
||||
|
||||
nocoverage: {envbindir}/trial --reactor={env:TWISTED_REACTOR:default} --reporter={env:TRIAL_REPORTER:verbose} {posargs:twisted}
|
||||
|
||||
|
||||
withcoverage: python {toxinidir}/admin/_copy.py {toxinidir}/admin/zz_coverage.pth {envsitepackagesdir}/zz_coverage.pth
|
||||
withcoverage: coverage erase
|
||||
withcoverage: coverage run -p --rcfile={toxinidir}/.coveragerc {envbindir}/trial --reactor={env:TWISTED_REACTOR:default} --reporter={env:TRIAL_REPORTER:verbose} {posargs:twisted}
|
||||
withcoverage: python {toxinidir}/admin/_copy.py "_trial_temp/.coverage*" {toxinidir}
|
||||
withcoverage: python {toxinidir}/admin/_copy.py ".coverage*" {toxinidir}
|
||||
|
||||
twistedchecker: twistedchecker {posargs:twisted}
|
||||
pyflakes: pyflakes {posargs:twisted admin bin}
|
||||
|
||||
apidocs: {toxinidir}/bin/admin/build-apidocs {toxinidir} apidocs
|
||||
narrativedocs: sphinx-build -aW -b html -d {toxinidir}/docs/_build {toxinidir}/docs {toxinidir}/docs/_build/
|
||||
|
||||
twistedchecker: twistedchecker src/{posargs:twisted}
|
||||
txchecker-travis: {toxinidir}/.travis/twistedchecker-trunk-diff.sh {posargs:twisted}
|
||||
|
||||
|
@ -102,7 +111,6 @@ commands =
|
|||
|
||||
manifest-checker: check-manifest --ignore "docs/_build*,docs/historic/*,admin*,bin/admin*,twisted/topfiles/*.Old"
|
||||
|
||||
|
||||
[testenv:twistedchecker]
|
||||
basepython=python2.7
|
||||
[testenv:pyflakes]
|
||||
|
|
Loading…
Reference in New Issue