Update code_coverage.yml #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code Coverage | |
on: | |
push: | |
paths: | |
- "GENetLib/*.py" | |
- "pytest/*.py" | |
- ".github/workflows/code_coverage.yml" | |
pull_request: | |
paths: | |
- "GENetLib/*.py" | |
- "pytest/*.py" | |
- ".github/workflows/code_coverage.yml" | |
workflow_dispatch: | |
jobs: | |
codecovPy: | |
name: Codecov workflow | |
runs-on: windows-latest | |
env: | |
PYTHON: "3.9" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install GENetLib and dependencies | |
run: | | |
pip install . | |
pip install pytest coverage codecov | |
- name: Generate coverage report | |
run: | | |
coverage run -m pytest | |
coverage xml -o coverage.xml | |
- name: Filter coverage report | |
run: | | |
python filter_coverage.py | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage_filtered.xml | |
verbose: true |