Skip to content

Commit

Permalink
coverage action added
Browse files Browse the repository at this point in the history
  • Loading branch information
97gamjak committed Oct 27, 2023
1 parent b16db7e commit b0ec805
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: codecov

on:
push:
branches: [main]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: 3.10

- name: Generate coverage report
run: |
pip install pytest
pip install pytest-cov
python -m pytest --cov=PQAnalysis --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./htmlcov/
env_vars: OS,PYTHON
fail_ci_if_error: true
flags: unittests
verbose: true

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ build/

_version.py
**/*.ipynb

.coverage
htmlcov/
Binary file modified PQAnalysis/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file removed PQAnalysis/__pycache__/__init__.cpython-38.pyc
Binary file not shown.

0 comments on commit b0ec805

Please sign in to comment.