Skip to content

Commit

Permalink
codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Jul 24, 2020
1 parent dbcbd4c commit f41c7ae
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 15 deletions.
41 changes: 26 additions & 15 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
# .coveragerc to control coverage.py
[run]
cover_pylib = false
branch = True
source = src/

omit =
/home/travis/virtualenv/*
*/site-packages/*
*/bin/*
archive/*
*/.local/*

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
pragma: no cover
def __repr__
except RuntimeError
except NotImplementedError
except ImportError
except FileNotFoundError
except CalledProcessError
logging.warning
logging.error
logging.critical
if __name__ == .__main__.:
# 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__.:

ignore_errors = True

[html]
directory = coverage_html_report
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: ci

on:
push:
paths:
Expand All @@ -25,6 +26,13 @@ jobs:
CC: gcc-9
FC: gfortran-9

# codecov coverage
- run: pip install codecov pytest-cov
- run: pytest --cov --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1


macos:
runs-on: macos-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![image](https://zenodo.org/badge/DOI/10.5281/zenodo.240895.svg)](https://doi.org/10.5281/zenodo.240895)
![Actions Status](https://github.com/space-physics/iri2016/workflows/ci/badge.svg)
[![codecov](https://codecov.io/gh/space-physics/iri2016/branch/master/graph/badge.svg)](https://codecov.io/gh/space-physics/iri2016)
[![PyPi version](https://img.shields.io/pypi/pyversions/iri2016.svg)](https://pypi.python.org/pypi/iri2016)
[![PyPi Download stats](http://pepy.tech/badge/iri2016)](http://pepy.tech/project/iri2016)

Expand Down

0 comments on commit f41c7ae

Please sign in to comment.