Skip to content
This repository has been archived by the owner on Nov 17, 2024. It is now read-only.

Commit

Permalink
ci: add codecov (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher authored Sep 28, 2023
1 parent 609ebd5 commit 47c0728
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 3 deletions.
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=gsms \
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
Empty file added gsms/__init__.py
Empty file.
File renamed without 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
2 changes: 1 addition & 1 deletion scripts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
def build():
"""Sets arguments for pyinstaller, creates spec, and builds binaries."""
pyinstaller_args = [
'gsms.py',
'gsms/gsms.py',
'--onefile',
'--noconfirm',
'--paths=./',
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_gsms.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import pytest

# local imports
import gsms
from gsms import gsms


def test_windows_guid_wrapper():
Expand Down

0 comments on commit 47c0728

Please sign in to comment.