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

CI: add codecov #1189

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ coverage:
target: 1
patch: false
changes: false
comment: off
comment: false
21 changes: 21 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,24 @@ include = */asv/*
branch = True
disable_warnings =
include-ignored

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__
if self\.debug

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:

# Don't complain about abstract methods, they aren't run:
@(abc\.)?abstractmethod
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,18 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: python -m pip install -r requirements-dev.txt

- name: Install asv
run: pip install .
run: pip install .[test]

- name: Run tests
run: python -m pytest -v --timeout=1800 --durations=20 test
run: python -m pytest -v --cov=asv --cov-report=xml

- uses: codecov/codecov-action@v2
with:
files: ./coverage.xml
flags: unittests
name: codecov-asv
verbose: true

docs:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ selenium
pytest-xdist
pytest-rerunfailures>=10.0
pytest-timeout
pytest-cov
feedparser
python-hglib
flake8
Expand Down
4 changes: 3 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ test =
pytest-xdist
pytest-timeout
pytest-rerunfailures>=10.0
pytest-cov
filelock
virtualenv
numpy
Expand All @@ -57,7 +58,8 @@ console_scripts =
asv = asv.__main__:main

[tool:pytest]
addopts=-p no:logging
addopts=-p no:logging --timeout=1800 --durations=20
testpaths = test

[flake8]
max-line-length = 99
Expand Down