From bee4eb393e0141754c7cadc1b2078fc55eb678f8 Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Sun, 25 Jan 2026 22:49:59 -0800 Subject: [PATCH] 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 --- .gitea/workflows/ci.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 2312cc2..8cc2855 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -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