Skip to content

Commit

Permalink
Add code coverage by Codecov (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas authored Dec 5, 2024
1 parent c983b84 commit 054d810
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,15 @@ jobs:
PYTEST_ADDOPTS: "--durations=0"
run: |
aiida-mock-code || true
cd tests; pytest
pytest -s --cov=aiida_test_cache tests/
- name: Upload coverage report
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: pytest-py${{ matrix.python-version }}
files: ./coverage.xml
fail_ci_if_error: false # don't fail job, if coverage upload fails

pre-commit:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ tests = [
"aiida-diff",
"pytest-datadir",
"pytest-mock",
"pytest-cov>=4.0",
]
pre_commit = [
"pre-commit",
Expand All @@ -76,6 +77,7 @@ aiida_mock_code = "aiida_test_cache.mock_code"
aiida_archive_cache = "aiida_test_cache.archive_cache"

[tool.pytest.ini_options]
addopts = '--durations=10 --durations-min=3 --strict-config --strict-markers -ra --cov-report xml --cov-append'
filterwarnings = []

[tool.yapf]
Expand Down

0 comments on commit 054d810

Please sign in to comment.