mirror of
https://github.com/certbot/certbot.git
synced 2026-05-28 04:34:11 -04:00
Consolidate cover envs and default to py3-cover (#7905)
* Consolidate cover envs and default to py3-cover * use py38 for code coverage in Travis * Disable coverage on Python < 3.6 line.
This commit is contained in:
parent
f66314926a
commit
859dc38cb9
3 changed files with 12 additions and 23 deletions
10
.travis.yml
10
.travis.yml
|
|
@ -44,8 +44,8 @@ matrix:
|
|||
<<: *not-on-master
|
||||
|
||||
# This job is always executed, including on master
|
||||
- python: "2.7"
|
||||
env: TOXENV=py27-cover FYI="py27 tests + code coverage"
|
||||
- python: "3.8"
|
||||
env: TOXENV=py38-cover FYI="py38 tests + code coverage"
|
||||
|
||||
- python: "3.7"
|
||||
env: TOXENV=lint
|
||||
|
|
@ -60,12 +60,12 @@ matrix:
|
|||
dist: trusty
|
||||
env: TOXENV='py27-{acme,apache,apache-v2,certbot,dns,nginx}-oldest'
|
||||
<<: *not-on-master
|
||||
- python: "2.7"
|
||||
env: TOXENV=py27
|
||||
<<: *not-on-master
|
||||
- python: "3.5"
|
||||
env: TOXENV=py35
|
||||
<<: *not-on-master
|
||||
- python: "3.8"
|
||||
env: TOXENV=py38
|
||||
<<: *not-on-master
|
||||
- sudo: required
|
||||
env: TOXENV=apache_compat
|
||||
services: docker
|
||||
|
|
|
|||
|
|
@ -741,7 +741,7 @@ class ApacheParser(object):
|
|||
"""
|
||||
if sys.version_info < (3, 6):
|
||||
# This strips off final /Z(?ms)
|
||||
return fnmatch.translate(clean_fn_match)[:-7]
|
||||
return fnmatch.translate(clean_fn_match)[:-7] # pragma: no cover
|
||||
# Since Python 3.6, it returns a different pattern like (?s:.*\.load)\Z
|
||||
return fnmatch.translate(clean_fn_match)[4:-3] # pragma: no cover
|
||||
|
||||
|
|
|
|||
23
tox.ini
23
tox.ini
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
[tox]
|
||||
skipsdist = true
|
||||
envlist = modification,py3,py27-cover,lint,mypy
|
||||
envlist = modification,py3-cover,lint,mypy
|
||||
|
||||
[base]
|
||||
# pip installs the requested packages in editable mode
|
||||
|
|
@ -63,8 +63,11 @@ source_paths =
|
|||
passenv =
|
||||
CERTBOT_NO_PIN
|
||||
commands =
|
||||
{[base]install_and_test} {[base]all_packages}
|
||||
python tests/lock_test.py
|
||||
!cover: {[base]install_and_test} {[base]all_packages}
|
||||
!cover: python tests/lock_test.py
|
||||
cover: {[base]install_packages}
|
||||
cover: {[base]pip_install} certbot-apache[dev]
|
||||
cover: python tox.cover.py
|
||||
# We always recreate the virtual environment to avoid problems like
|
||||
# https://github.com/certbot/certbot/issues/7745.
|
||||
recreate = true
|
||||
|
|
@ -116,20 +119,6 @@ commands =
|
|||
setenv =
|
||||
{[testenv:py27-oldest]setenv}
|
||||
|
||||
[testenv:py27-cover]
|
||||
basepython = python2.7
|
||||
commands =
|
||||
{[base]install_packages}
|
||||
{[base]pip_install} certbot-apache[dev]
|
||||
python tox.cover.py
|
||||
|
||||
[testenv:py37-cover]
|
||||
basepython = python3.7
|
||||
commands =
|
||||
{[base]install_packages}
|
||||
{[base]pip_install} certbot-apache[dev]
|
||||
python tox.cover.py
|
||||
|
||||
[testenv:lint]
|
||||
basepython = python3
|
||||
# separating into multiple invocations disables cross package
|
||||
|
|
|
|||
Loading…
Reference in a new issue