Skip to content

Commit

Permalink
Collect coverage information for unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
robomics committed Nov 27, 2024
1 parent f2dc3b8 commit cb83d19
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/.codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (C) 2024 Roberto Rossini <[email protected]>
#
# SPDX-License-Identifier: MIT

ignore:
- "test/"
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,17 @@ jobs:
run: pip install --verbose '.[test]'

- name: Run unit tests
run: python -m pytest test -v
run: python -m pytest --cov -v --cov-report=xml .

- name: Upload unit test coverage report to Codecov
uses: codecov/codecov-action@v4
with:
flags: "tests | unit | python-${{ matrix.python_version }}"
disable_search: true
files: coverage.xml
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

- name: Run simple CLI tests
run: |
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ dependencies = [

test = [
"pytest",
"pytest-cov",
"stripepy",
]

Expand Down

0 comments on commit cb83d19

Please sign in to comment.