Skip to content

Commit 923d729

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

File tree

1 file changed

+34
-19
lines changed

1 file changed

+34
-19
lines changed

.github/workflows/coverage.yml

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,48 @@ on:
55
branches: [main]
66
pull_request:
77
branches: [main]
8+
89
jobs:
910
coverage:
10-
runs-on: macos-latest
11-
env:
12-
PYO3_PYTHON: "/opt/homebrew/opt/python@3.12/bin/python3.12"
11+
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: data-plane
1315
steps:
14-
- name: Checkout
16+
- name: Checkout code
1517
uses: actions/checkout@v4
18+
1619
- name: Setup Rust
17-
uses: dtolnay/rust-toolchain@stable
18-
- name: Install Homebrew dependencies
19-
run: brew install python@3.12 just llvm nettle pkg-config
20-
- name: Restore Rust cache
21-
uses: Swatinem/rust-cache@v2
20+
uses: ./.github/actions/setup-rust
2221
with:
23-
cache-on-failure: true
22+
workspace: ./data-plane
23+
24+
- name: Install just
25+
run: |
26+
sudo snap install just --classic || true
27+
2428
- name: Install cargo-llvm-cov
25-
uses: taiki-e/install-action@v2
29+
run: cargo install cargo-llvm-cov
30+
31+
- name: Setup UV
32+
id: setup-uv
33+
uses: ./.github/actions/setup-python
2634
with:
27-
tool: cargo-llvm-cov
28-
- name: Generate coverage
29-
run: just coverage
30-
- name: Upload coverage to Codecov
35+
uv-install: true
36+
37+
- name: Generate data plane coverage report (Rust + Python)
38+
run: task data-plane:coverage-full
39+
40+
- name: Generate control-plane coverage reports
41+
run: task control-plane:coverage
42+
working-directory: control-plane
43+
44+
- name: Upload combined coverage to Codecov
3145
uses: codecov/codecov-action@v4
3246
with:
33-
files: coverage/lcov.info
34-
flags: rust
35-
name: rust-coverage
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
3650
fail_ci_if_error: true
37-
token: ${{ secrets.CODECOV_TOKEN }}
51+
env:
52+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)