-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (62 loc) · 2.14 KB
/
Copy pathci.yml
File metadata and controls
81 lines (62 loc) · 2.14 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
74
75
76
77
78
79
80
81
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
- name: Clippy
# Lints are configured in Cargo.toml [lints.clippy] section
# Note: python feature excluded here (tested in python.yml with maturin)
run: cargo clippy --all-targets --features lsp,wasm -- -D warnings
- name: Build
run: cargo build --features lsp,wasm
- name: Run tests
run: cargo test --features lsp,wasm --verbose
- name: Run demo tests
run: cargo test --test demo_tests --features lsp,wasm
- name: Check demo coverage
# Enforce minimum demo coverage threshold (DT-19)
# Threshold roadmap: 35% baseline → 70% Wave 2 → 85% Wave 3 → 95% full
run: ./scripts/demo-coverage.sh --ci --threshold 35
- name: Verify demo documentation is current
run: ./scripts/generate-demos.sh --book --check
# Coverage reporting (runs separately to not block main checks)
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Build binary (required for CLI tests)
run: cargo build --features lsp,wasm
- name: Generate coverage
# Note: python feature excluded (tested in python.yml with maturin)
run: cargo llvm-cov --features lsp,wasm --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: lcov.info
fail_ci_if_error: false