-
Notifications
You must be signed in to change notification settings - Fork 14
56 lines (54 loc) · 1.45 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
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Code Coverage
on:
push:
paths:
- "skscope/*.py"
- "src/**"
- "pytest/*.py"
- ".github/workflows/code_coverage.yml"
pull_request:
paths:
- "skscope/*.py"
- "src/**"
- "pytest/*.py"
- ".github/workflows/code_coverage.yml"
workflow_dispatch:
jobs:
codecovPy:
name: Codecov workflow
runs-on: ubuntu-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 skscope & dependencies
run: |
export PROFILE=1
pip install .
ls * -al
- name: Generate coverage report
run: |
pip install pytest
pip install pytest-cov
pip install gcovr
pip install pandas
cd ./pytest
pytest --cov=skscope -v --cov-report=xml
ls * -al
cd ..
gcovr --filter src/ --exclude-throw-branches --exclude-unreachable-branches --print-summary --xml cpp_coverage.xml
ls * -al
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./pytest/coverage.xml, ./cpp_coverage.xml
verbose: true