Skip to content

Commit 554ff8e

Browse files
committed
chore(ci): fix coverage workflow
Signed-off-by: Luca Muscariello <muscariello@ieee.org>
1 parent 923d729 commit 554ff8e

File tree

1 file changed

+28
-23
lines changed

1 file changed

+28
-23
lines changed

.github/workflows/coverage.yml

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,49 @@ on:
99
jobs:
1010
coverage:
1111
runs-on: ubuntu-latest
12-
defaults:
13-
run:
14-
working-directory: data-plane
12+
env:
13+
PYO3_PYTHON: python
1514
steps:
1615
- name: Checkout code
1716
uses: actions/checkout@v4
1817

1918
- name: Setup Rust
20-
uses: ./.github/actions/setup-rust
21-
with:
22-
workspace: ./data-plane
19+
uses: dtolnay/rust-toolchain@stable
2320

24-
- name: Install just
25-
run: |
26-
sudo snap install just --classic || true
21+
- name: Setup Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.12"
2725

28-
- name: Install cargo-llvm-cov
29-
run: cargo install cargo-llvm-cov
26+
- name: Install Linux dependencies
27+
run: sudo apt-get update && sudo apt-get install -y pkg-config nettle-dev
3028

31-
- name: Setup UV
32-
id: setup-uv
33-
uses: ./.github/actions/setup-python
29+
- name: Restore Rust cache
30+
uses: Swatinem/rust-cache@v2
3431
with:
35-
uv-install: true
32+
cache-on-failure: true
3633

37-
- name: Generate data plane coverage report (Rust + Python)
38-
run: task data-plane:coverage-full
34+
- name: Install LLVM tools
35+
run: rustup component add llvm-tools-preview
3936

40-
- name: Generate control-plane coverage reports
41-
run: task control-plane:coverage
42-
working-directory: control-plane
37+
- name: Install cargo-llvm-cov
38+
uses: taiki-e/install-action@v2
39+
with:
40+
tool: cargo-llvm-cov
41+
42+
- name: Generate coverage report
43+
run: |
44+
mkdir -p coverage
45+
cargo llvm-cov --workspace --features coverage --lcov \
46+
--output-path coverage/lcov.info \
47+
--ignore-filename-regex "/rustc-[^/]+/"
4348
4449
- name: Upload combined coverage to Codecov
4550
uses: codecov/codecov-action@v4
4651
with:
47-
files: data-plane/lcov.info,data-plane/python/bindings/coverage.lcov,control-plane/*-coverage.out
48-
flags: rust,python,go
49-
name: combined-coverage
52+
files: coverage/lcov.info
53+
flags: rust
54+
name: rust-coverage
5055
fail_ci_if_error: true
5156
env:
5257
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)