Repository navigation
73 lines (70 loc) · 2.48 KB
/
Copy pathcoverage.yaml
File metadata and controls
73 lines (70 loc) · 2.48 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Rust checks and tests
on:
workflow_call:
inputs:
coverage:
description: Collect and upload combined default and Kafka coverage.
type: boolean
default: false
permissions:
contents: read
env:
NEXT_ASSETS_PATH: ${{ github.workspace }}/frontend/dist
jobs:
community-ui:
runs-on: blacksmith-8vcpu-ubuntu-2404
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24'
- name: Test community UI overlay
run: node --test scripts/test-community-ui.mjs
clippy:
runs-on: blacksmith-8vcpu-ubuntu-2404
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-rust-ci
with:
cache-key: rust-clippy
tools: cargo-hack
- name: Check all feature configurations with Clippy
# cargo-hack temporarily removes dev dependencies and updates Cargo.lock;
# --locked would reject that temporary manifest before Clippy can run.
run: cargo hack clippy --verbose --each-feature --no-dev-deps -- -D warnings
tests:
runs-on: blacksmith-8vcpu-ubuntu-2404
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-rust-ci
with:
cache-key: rust-tests-${{ inputs.coverage && 'coverage' || 'plain' }}
tools: ${{ inputs.coverage && 'cargo-llvm-cov, nextest' || 'nextest' }}
- name: Test default feature set
if: ${{ !inputs.coverage }}
run: cargo nextest run --locked
- name: Test Kafka feature
if: ${{ !inputs.coverage }}
run: cargo nextest run --locked --features kafka -E 'test(kafka)'
- name: Clear stale workspace coverage
if: inputs.coverage
run: cargo llvm-cov clean --workspace
- name: Test default feature set with coverage
if: inputs.coverage
run: cargo llvm-cov nextest --locked --no-report
- name: Test Kafka feature with coverage
if: inputs.coverage
run: cargo llvm-cov nextest --locked --features kafka --no-report --filter-expr 'test(kafka)'
- name: Generate combined coverage report
if: inputs.coverage
run: cargo llvm-cov report --lcov --output-path coverage.lcov
- name: Upload coverage report
if: inputs.coverage
uses: actions/upload-artifact@v4
with:
name: rust-coverage
path: coverage.lcov
if-no-files-found: error