-
Notifications
You must be signed in to change notification settings - Fork 265
48 lines (44 loc) · 1.41 KB
/
Copy pathcoverage.yml
File metadata and controls
48 lines (44 loc) · 1.41 KB
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
name: Coverage
on: [push]
jobs:
build:
name: Checking test coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download Codecov
run: |
curl -Os https://cli.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov --version
- name: Install lcov
run: sudo apt-get install -y lcov
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest coverage multiprocess matplotlib numpy
- name: Build package
run: |
pip install . -v
env:
FFP_CONTRACT_OFF: 1
COVERAGE: 1
GCOV_PREFIX: ${{ github.workspace }}
GCOV_PREFIX_STRIP: 0
- name: Running unittests
run: |
python -m coverage run -m unittest discover -s rebound/tests/ -v
- name: Move coverage files
run: |
find . -name "*.gcda" -exec cp {} ./src \;
find . -name "*.gcno" -exec cp {} ./src/ \;
- name: Run lcov
run: |
lcov --capture --directory src --output-file coverage.info
- name: Upload coverage reports
run: |
./codecov --verbose upload-process -t ${{ secrets.CODECOV_TOKEN }}