Barry Warsaw pushed to branch master at mailman / Mailman
Commits:
df14cc6d by Barry Warsaw at 2016-01-31T13:37:37-05:00
Refactor tox.ini for generated environments.
- - - - -
545ba72e by Barry Warsaw at 2016-01-31T13:59:10-05:00
Make sure we're using the right environment.
- - - - -
2 changed files:
- .gitlab-ci.yml
- tox.ini
Changes:
=====================================
.gitlab-ci.yml
=====================================
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -13,12 +13,12 @@ variables:
sqlite:
script:
- - tox
+ - tox -e py34,py35
pgsql:
services:
- postgres:latest
script:
- - MAILMAN_EXTRA_TESTING_CFG=/home/runner/configs/postgres.cfg tox -e pg
+ - MAILMAN_EXTRA_TESTING_CFG=/home/runner/configs/postgres.cfg tox -e
{py34,py35}-pg
tags:
- postgres
=====================================
tox.ini
=====================================
--- a/tox.ini
+++ b/tox.ini
@@ -1,56 +1,31 @@
[tox]
-envlist = py34,py35
+envlist = {py34,py35}{,-coverage,-diffcov}{,-pg}
recreate = True
skip_missing_interpreters = True
[testenv]
-commands = python -m nose2 -v
+commands =
+ python -m nose2 -v
+ {coverage,diffcov}: python -m coverage run {[coverage]rc} -m nose2 -v
+ {coverage,diffcov}: python -m coverage combine {[coverage]rc}
+ coverage: python -m coverage html {[coverage]rc}
+ coverage: python -m coverage report -m {[coverage]rc}
+ diffcov: python -m coverage xml {[coverage]rc}
+ diffcov: diff-cover coverage.xml --html-report diffcov.html
+ diffcov: diff-cover coverage.xml
#sitepackages = True
usedevelop = True
+deps =
+ {coverage,diffcov}: coverage
+ pg: psycopg2
+ diffcov: diff_cover
passenv=
MAILMAN_*
-
-# This environment requires you to set up PostgreSQL and create a .cfg file
-# somewhere outside of the source tree.
-[testenv:pg]
-basepython = python3
-commands = python -m nose2 -v
-usedevelop = True
-deps = psycopg2
+setenv =
+ coverage: COVERAGE_PROCESS_START={[coverage]rcfile}
+ coverage: COVERAGE_OPTIONS="-p"
+ coverage: COVERAGE_FILE={toxinidir}/.coverage
[coverage]
rcfile = {toxinidir}/coverage.ini
rc = --rcfile={[coverage]rcfile}
-
-[testenv:coverage]
-basepython = python3
-commands =
- python -m coverage run {[coverage]rc} -m nose2 -v
- python -m coverage combine {[coverage]rc}
- python -m coverage html {[coverage]rc}
- python -m coverage report -m {[coverage]rc}
-#sitepackages = True
-usedevelop = True
-deps = coverage
-setenv =
- COVERAGE_PROCESS_START={[coverage]rcfile}
- COVERAGE_OPTIONS="-p"
- COVERAGE_FILE={toxinidir}/.coverage
-
-[testenv:diffcov]
-basepython = python3
-commands =
- python -m coverage run {[coverage]rc} -m nose2 -v
- python -m coverage combine {[coverage]rc}
- python -m coverage xml {[coverage]rc}
- diff-cover coverage.xml --html-report diffcov.html
- diff-cover coverage.xml
-#sitepackages = True
-usedevelop = True
-deps =
- coverage
- diff_cover
-setenv =
- COVERAGE_PROCESS_START={[coverage]rcfile}
- COVERAGE_OPTIONS="-p"
- COVERAGE_FILE={toxinidir}/.coverage
View it on GitLab:
https://gitlab.com/mailman/mailman/compare/802ce668e67f51f904c69fdab2f5565a73c15e8a...545ba72eba19bdef60c56d4dbe63b8b911fdbadd
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org