Skip to content

Commit

Permalink
CI: add codecov step (#57)
Browse files Browse the repository at this point in the history
The code coverage check is added to help keeping good quality
of the project and covered as much as possible with tests that
actually uses the majority of the routines.
  • Loading branch information
bastonero committed Feb 22, 2024
1 parent 3c544b6 commit f36e8a1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,13 @@ jobs:
- name: Run pytest
env:
AIIDA_WARN_v3: 1
run: pytest -sv tests
run: pytest -sv --cov aiida_vibroscopy tests

- name: Upload to Codecov
if: matrix.python-version == 3.10
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: pytests-lammps
flags: pytests
fail_ci_if_error: true
10 changes: 10 additions & 0 deletions codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
coverage:
status:
project:
default:
target: 75%
threshold: 0.2%
patch:
default:
target: 70%
threshold: 0.2%
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ pre-commit = [
tests = [
'pgtest~=1.3',
'pytest~=6.0',
'coverage[toml]',
'pytest-cov',
'pytest-regressions~=2.3',
'pytest-timeout',
]
docs = [
'myst-nb~=1.0.0',
Expand Down

0 comments on commit f36e8a1

Please sign in to comment.