Skip to content

Commit

Permalink
Setup Codecov uploading and reporting (#124)
Browse files Browse the repository at this point in the history
* Enable Codecov uploading and reporting on CI
* Remove Codecov terminal output
  • Loading branch information
glatterf42 authored Oct 18, 2024
1 parent e3ee9c8 commit 2df83c5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
coverage:
precision: 1
status:
project:
default:
informational: true
patch:
default:
informational: true

comment:
require_changes: true
# Don't display the large graph
layout: "diff, files"
11 changes: 10 additions & 1 deletion .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,16 @@ jobs:
- name: Run tests
run: |
source .venv/bin/activate
pytest --backend ${{ matrix.backend }} --postgres-dsn "postgresql://postgres:postgres@localhost:5432/test" --cov-report xml:.coverage.xml --cov-report term --cov=ixmp4 -rsxX --benchmark-skip --color=yes
pytest --backend ${{ matrix.backend }} --postgres-dsn "postgresql://postgres:postgres@localhost:5432/test" --cov-report xml:.coverage.xml --cov=ixmp4 -rsxX --benchmark-skip --color=yes
#------------------------------
# Upload coverage to codecov
#------------------------------
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: .coverage.xml

pre-commit:
name: Code quality
Expand Down

0 comments on commit 2df83c5

Please sign in to comment.