Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support coverage -p #277

Merged
merged 6 commits into from Dec 29, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -11,6 +11,6 @@ MANIFEST
.coverage
coverage
htmlcov
_trial_temp
_trial_temp*
.tox
_trial_temp.lock
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -8,7 +8,7 @@ cache: pip
jobs:
include:
- python: "3.8"
env: TOXENV=towncrier,twine,check-manifest,flake8,docs
env: TOXENV=twine,check-manifest,flake8,docs,coverage-report
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The preceding envs won't generate any coverage. Shouldn't tox2travis.py filter out coverage-report? This is causing the build to fail:

coverage-report run-test-pre: PYTHONHASHSEED='4152157654'
coverage-report run-test: commands[0] | coverage combine
No data to combine
ERROR: InvocationError for command /home/travis/build/twisted/treq/.tox/coverage-report/bin/coverage combine (exited with code 1)

- python: "2.7"
env: TOXENV=py27-twisted_lowest,py27-twisted_latest
- python: "3.5"
Expand Down Expand Up @@ -58,6 +58,7 @@ script:
- tox

after_success:
- coverage combine
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update and run tox2travis.py instead of editing this file.

- coveralls

after_failure:
Expand Down
11 changes: 8 additions & 3 deletions tox.ini
Expand Up @@ -3,7 +3,7 @@ envlist =
{pypy,py27,py35,py36,py37}-twisted_lowest,
{pypy,pypy3,py27,py35,py36,py37,py38}-twisted_latest,
{pypy3,py35,py36,py37,py38}-twisted_trunk-pyopenssl_trunk,
towncrier, twine, check-manifest, flake8, docs
twine, check-manifest, flake8, docs, coverage-report

[testenv]
extras = dev
Expand All @@ -26,8 +26,7 @@ setenv =
passenv = TERM # ensure colors
commands =
pip list
coverage run {envbindir}/trial {posargs:treq}
coverage report -m
coverage run -p {envbindir}/trial {posargs:treq}

[testenv:flake8]
skip_install = True
Expand Down Expand Up @@ -58,3 +57,9 @@ commands =
changedir = docs
commands =
sphinx-build -b html . html

[testenv:coverage-report]
depends = pypy,py27,py35,py36,py37
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, I didn't realize you can depend on factors alone!

commands =
coverage combine
coverage report
1 change: 1 addition & 0 deletions tox2travis.py
Expand Up @@ -40,6 +40,7 @@
- tox

after_success:
- coverage combine
- coveralls

after_failure:
Expand Down