ci: enforce coverage thresholds in CI pipeline

- Run frontend tests with coverage thresholds (15% lines/statements)
- Add llvm-tools-preview component for Rust coverage
- Install cargo-llvm-cov and enforce 50% line coverage for backend
- CI will now fail if coverage drops below thresholds
This commit is contained in:
2026-01-25 22:49:59 -08:00
parent 78b951a865
commit bee4eb393e
+8 -5
View File
@@ -49,13 +49,13 @@ jobs:
- name: Run Svelte Check
run: pnpm check
- name: Run frontend tests
run: pnpm test
- name: Run frontend tests with coverage
run: pnpm test:coverage
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
components: clippy, llvm-tools-preview
- name: Cache Rust dependencies
uses: actions/cache@v4
@@ -68,13 +68,16 @@ jobs:
src-tauri/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov --locked
- name: Run Clippy
working-directory: src-tauri
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run Rust tests
- name: Run Rust tests with coverage
working-directory: src-tauri
run: cargo test
run: cargo llvm-cov --fail-under-lines 50
build-linux:
name: Build Linux