Skip to content

Commit 13b43cc

Browse files
committed
Add codecov to CI
1 parent 2da4787 commit 13b43cc

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.github/workflows/ci.yml

+31
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,34 @@ jobs:
162162
pip install tox
163163
tox -c examples/linalg
164164
tox -c examples/parallel
165+
166+
coverage:
167+
runs-on: ubuntu-latest
168+
steps:
169+
- uses: actions/checkout@v2
170+
- name: Set up Python
171+
uses: actions/setup-python@v2
172+
with:
173+
python-version: 3.9
174+
architecture: x64
175+
- name: Install numpy
176+
run: pip install numpy
177+
- uses: Swatinem/rust-cache@v1
178+
continue-on-error: true
179+
- uses: actions-rs/toolchain@v1
180+
with:
181+
# TODO: this is pinned to work around a rustc bug in instrumented coverage
182+
# https://github.com/taiki-e/cargo-llvm-cov/issues/128
183+
toolchain: nightly-2022-01-14
184+
override: true
185+
profile: minimal
186+
components: llvm-tools-preview
187+
- name: Install cargo-llvm-cov
188+
uses: taiki-e/install-action@cargo-llvm-cov
189+
- name: Generate code coverage
190+
run: cargo llvm-cov --lcov --output-path coverage.lcov
191+
- name: Upload coverage to Codecov
192+
uses: codecov/codecov-action@v2
193+
with:
194+
file: coverage.lcov
195+
fail_ci_if_error: true

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ build/
1515
*.egg-info/
1616
**/dist/
1717
__pycache__
18+
19+
# Coverage files
20+
*.lcov

0 commit comments

Comments
 (0)