|
9 | 9 | jobs: |
10 | 10 | coverage: |
11 | 11 | runs-on: ubuntu-latest |
12 | | - defaults: |
13 | | - run: |
14 | | - working-directory: data-plane |
| 12 | + env: |
| 13 | + PYO3_PYTHON: python |
15 | 14 | steps: |
16 | 15 | - name: Checkout code |
17 | 16 | uses: actions/checkout@v4 |
18 | 17 |
|
19 | 18 | - name: Setup Rust |
20 | | - uses: ./.github/actions/setup-rust |
21 | | - with: |
22 | | - workspace: ./data-plane |
| 19 | + uses: dtolnay/rust-toolchain@stable |
23 | 20 |
|
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" |
27 | 25 |
|
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 |
30 | 28 |
|
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 |
34 | 31 | with: |
35 | | - uv-install: true |
| 32 | + cache-on-failure: true |
36 | 33 |
|
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 |
39 | 36 |
|
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-[^/]+/" |
43 | 48 |
|
44 | 49 | - name: Upload combined coverage to Codecov |
45 | 50 | uses: codecov/codecov-action@v4 |
46 | 51 | 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 |
50 | 55 | fail_ci_if_error: true |
51 | 56 | env: |
52 | 57 | CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
0 commit comments