Skip to content

Coverage config #8003

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

Merged
merged 3 commits into from
Feb 4, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ENH: Submit coverage on AppVeyor.
This way we can get coverage for platform-dependant lines.
  • Loading branch information
dopplershift committed Feb 4, 2017
commit 12691f11219604d8bcd5885aaff32e97dda7865d
6 changes: 5 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ environment:
CMD_IN_ENV: "cmd /E:ON /V:ON /C obvci_appveyor_python_build_env.cmd"
# Workaround for https://github.com/conda/conda-build/issues/636
PYTHONIOENCODING: "UTF-8"
PYTEST_ARGS: -ra --timeout=300 --durations=25 -n %NUMBER_OF_PROCESSORS% #--cov-report= --cov=lib
PYTEST_ARGS: -ra --timeout=300 --durations=25 -n %NUMBER_OF_PROCESSORS% --cov-report= --cov=lib
USE_PYTEST: no
PYTHONHASHSEED: 0 # Workaround for pytest-xdist flaky collection order
# https://github.com/pytest-dev/pytest/issues/920
Expand Down Expand Up @@ -140,6 +140,8 @@ test_script:
- if x%USE_PYTEST% == xno python tests.py %PYTEST_ARGS%
# Generate a html for visual tests
- python visual_tests.py
- if x%USE_PYTEST% == xyes pip install codecov
- if x%USE_PYTEST% == xyes codecov -e PYTHON_VERSION PLATFORM
Copy link
Member

@dstansby dstansby Feb 4, 2017

Choose a reason for hiding this comment

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

These lines mean that codecov only happens if USE_PYTEST is true, which is only for the one build. pytest is still being run in the other builds, just through tests.py in the root which calls test() in matplotlib/__init__.py.

I don't know if running the tests using test.py collects coverage, but if it does I guess these if statements can just go.

Copy link
Member

Choose a reason for hiding this comment

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

Yea, these conditions could be dropped.


after_test:
# After the tests were a success, build packages (wheels and conda)
Expand Down Expand Up @@ -175,6 +177,8 @@ artifacts:
name: result_images
type: zip

on_finish:

on_failure:
- python visual_tests.py
- echo zipping images after a failure...
Expand Down