-
Notifications
You must be signed in to change notification settings - Fork 7
43 lines (41 loc) · 1.16 KB
/
code_coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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 for specific functions
run: |
coverage run -m pytest -m "not slow" pytest/test_sim_data_scalar.py pytest/test_sim_data_func.py pytest/test_func_ge.py pytest/test_grid_func_ge.py
coverage xml -o coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
verbose: true