Skip to content

Commit

Permalink
CI: Add code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
namannimmo10 committed Jul 18, 2024
1 parent 053e780 commit 12c4853
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/tests_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,21 @@ jobs:
post-cleanup: 'all'
init-shell: bash

- name: Install httomolibgpu
- name: Install httomolibgpu & coverage tools
run: |
sudo yum install -y git
pip install .[dev]
pip install coverage
micromamba list
- name: Run tests
run: |
pytest tests/
coverage run -m pytest tests/
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: Code Coverage
fail_ci_if_error: true
8 changes: 8 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
coverage:
status:
project:
default:
target: 90%
comment:
layout: "header, diff, flags, files"
behavior: default

0 comments on commit 12c4853

Please sign in to comment.