Skip to content

Commit

Permalink
ci: add codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Sep 27, 2023
1 parent 609ebd5 commit c72e8c0
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,17 @@ jobs:
python -m pip install -r requirements-dev.txt
- name: Test with pytest
id: test
shell: bash
run: |
python -m pytest -v
python -m pytest \
-rxXs \
--tb=native \
--verbose \
--cov=. \
tests
- name: Upload coverage
# any except cancelled or skipped
if: always() && (steps.test.outcome == 'success' || steps.test.outcome == 'failure')
uses: codecov/codecov-action@v3
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,7 @@ Stats
.. image:: https://img.shields.io/github/stars/lizardbyte/gsms?logo=github&style=for-the-badge
:alt: GitHub stars
:target: https://github.com/LizardByte/GSMS

.. image:: https://img.shields.io/codecov/c/gh/LizardByte/GSMS?token=IC678AQFBI&style=for-the-badge&logo=codecov&label=codecov
:alt: Codecov
:target: https://codecov.io/gh/LizardByte/GSMS
15 changes: 15 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
codecov:
branch: master

coverage:
status:
project:
default:
target: auto
threshold: 10%

comment:
layout: "diff, flags, files"
behavior: default
require_changes: false # if true: only post the comment if coverage changes
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
flake8==6.1.0
pyinstaller==6.0.0
pytest==7.4.2
pytest-cov==4.1.0

0 comments on commit c72e8c0

Please sign in to comment.