-
-
Notifications
You must be signed in to change notification settings - Fork 119
46 lines (39 loc) · 1.15 KB
/
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
name: Coverage of Test Build
on:
push:
paths-ignore:
- 'docs/**'
jobs:
tests:
name: "Generate coverage report for tests"
runs-on: ubuntu-latest
steps:
- uses: "actions/checkout@v3"
with:
submodules: 'true'
- uses: "actions/setup-python@v4"
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest hypothesis pandas coverage cython
- name: Generate cython
run: |
chmod +x ./src/rapidfuzz/generate.sh
./src/rapidfuzz/generate.sh
# for cython tests inplace installation is required
- name: build
run: CXXFLAGS=-DCYTHON_TRACE_NOGIL=1 pip install -e . -v
- name: Test with pytest and generate coverage info
run: |
PYTHONPATH=$(pwd)/src coverage run -m pytest tests
coverage xml
coverage report
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
fail_ci_if_error: true
verbose: true