Update code_converage.yml #1
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_converage.yml" | |
pull_request: | |
paths: | |
- "GENetLib/*.py" | |
- "pytest/*.py" | |
- ".github/workflows/code_converage.yml" | |
workflow_dispatch: | |
jobs: | |
codecovPy: | |
name: Codecov workflow | |
runs-on: windows-latest | |
env: | |
PYTHON: "3.9" | |
steps: | |
- uses: actions/checkout@master | |
- name: Setup Python | |
uses: actions/setup-python@master | |
with: | |
python-version: 3.9 | |
- name: Checkout repository and submodules | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install GENetLib & dependencies | |
run: | | |
pip install . | |
- name: Generate coverage report | |
run: | | |
pip install pytest | |
pip install pytest-cov | |
pip install gcovr | |
pip install pandas | |
cd ./pytest | |
pytest --cov=GENetLib -v --cov-report=xml | |
cd .. | |
gcovr --filter src/ --exclude-throw-branches --exclude-unreachable-branches --print-summary --xml cpp_coverage.xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./pytest/coverage.xml, ./cpp_coverage.xml | |
verbose: true |