Skip to content

Commit 27582a3

Browse files
committed
code-coverage pytest
1 parent 00cbf34 commit 27582a3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/pytest.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,17 @@ jobs:
4444
sudo service redis-server start
4545
pip install pytest
4646
pytest -v tests/
47+
48+
- name: run coverage
49+
shell: bash
50+
run: sudo apt-get install lcov &&
51+
sudo lcov --directory . --capture --branch-coverage --rc geninfo_unexecuted_blocks=1 --ignore-errors mismatch --output-file coverage.info &&
52+
sudo lcov --remove coverage.info '/usr/*' --output-file coverage.info &&
53+
sudo lcov --list coverage.info
54+
55+
- name: Upload coverage to Codecov
56+
uses: codecov/codecov-action@v5
57+
with:
58+
token: ${{ secrets.CODECOV_TOKEN }}
59+
files: ./coverage.info
60+
fail_ci_if_error: true

0 commit comments

Comments
 (0)