1
0
Fork 0
mirror of synced 2024-11-22 00:05:34 -05:00

Add code coverage for all platforms

This commit is contained in:
Anish Athalye 2022-12-17 15:05:04 -05:00
parent e810f42ca2
commit 8468213bc6
3 changed files with 7 additions and 4 deletions

View file

@ -36,6 +36,8 @@ jobs:
- name: "Run tests" - name: "Run tests"
run: | run: |
python -m tox python -m tox
python -m tox -e coverage_report
- uses: codecov/codecov-action@v3
fmt: fmt:
name: Format name: Format

1
.gitignore vendored
View file

@ -6,5 +6,6 @@
.tox/ .tox/
.venv/ .venv/
build/ build/
coverage.xml
dist/ dist/
htmlcov/ htmlcov/

View file

@ -4,9 +4,9 @@
envlist = envlist =
coverage_erase coverage_erase
py{38, 39, 310}-all_platforms py{38, 39, 310}-all_platforms
coverage_report
py{27, 35, 36, 37}-most_platforms py{27, 35, 36, 37}-most_platforms
pypy{2, 3}-most_platforms pypy{2, 3}-most_platforms
coverage_report
skip_missing_interpreters = true skip_missing_interpreters = true
@ -16,15 +16,14 @@ platform =
most_platforms: cygwin|darwin|linux most_platforms: cygwin|darwin|linux
deps = deps =
coverage
pytest pytest
pytest-randomly pytest-randomly
pyyaml pyyaml
mock; python_version == "2.7" mock; python_version == "2.7"
all_platforms: coverage
commands = commands =
all_platforms: coverage run -m pytest tests/ coverage run -m pytest tests/
most_platforms: pytest tests/
[testenv:coverage_erase] [testenv:coverage_erase]
@ -44,6 +43,7 @@ commands_pre =
commands = commands =
coverage report coverage report
coverage html coverage html
coverage xml
[coverage:run] [coverage:run]