-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1.04 KB
/
coverage.yaml
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
name: coverage
on:
workflow_dispatch:
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
env:
SKBUILD_CMAKE_BUILD_TYPE: Debug
SKBUILD_BUILD_DIR: build/coverage
SKBUILD_CMAKE_DEFINE: BUILD_COVERAGE=ON
run: |
python -m pip install --upgrade pip
pip install scikit-build-core nanobind
pip install --no-build-isolation --editable '.[test,coverage]'
- name: Run tests
run: |
coverage run -m pytest -vv
- name: Generate coverage
run: |
cpp-coveralls --include src --include tests --dump cpp-coveralls.json
python3 -m coveralls --merge cpp-coveralls.json --output coveralls.json
- name: Upload coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
coveralls --submit coveralls.json