Skip to content

Commit

Permalink
Add codecov (#30)
Browse files Browse the repository at this point in the history
* Add codecov

* Fixup: fix coverage args

* fixup: no env matrix

* Add Cov badge

* Document and polish
  • Loading branch information
asmacdo authored May 14, 2024
1 parent ced2990 commit acd04d4
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,15 @@ jobs:
run: pip install .

- name: Run tests
run: tox -e py
run: tox -e py -- -vv --cov-report=xml

- name: Run smoke tests
run: ./smoke-tests.sh

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
name: ${{ matrix.python-version }}
# vim:set et sts=2:
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
__pycache__/
src/__pycache__/
duct.egg-info/

.coverage
coverage.*
.duct/
.idea
.tox/
11 changes: 11 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,14 @@ The following pull request labels are respected:
* tests: Add or improve existing tests
* dependencies: Update one or more dependencies version
* performance: Improve performance of an existing feature


Testing
-------
If you are contributing code, please consider adding a unit test.

To run the tests:
`tox`

To run tests on one file (args after -- are passed to pytest):
`tox -- test/test_my_thing.py`
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# duct

[![codecov](https://codecov.io/gh/con/duct/graph/badge.svg?token=JrPazw0Vn4)](https://codecov.io/gh/con/duct)

## Summary:

A process wrapper script that monitors the execution of a command.
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[tox]
envlist = lint,typing,py38,py39,py310,py311,py312,pypy3
# envlist = lint,py37,py38,py39,py310,py311,py312,pypy3
skip_missing_interpreters = True
isolated_build = True
minversion = 3.3.0
Expand Down Expand Up @@ -34,7 +33,7 @@ commands =
mypy src test

[pytest]
# addopts = --cov=datalad_installer --no-cov-on-fail
addopts = --cov=duct --no-cov-on-fail
filterwarnings = error
norecursedirs = test/data
markers =
Expand Down

0 comments on commit acd04d4

Please sign in to comment.