From 3774f63a5fb80b5ed63589a0cc1ce752220d56ab Mon Sep 17 00:00:00 2001 From: gnacho Date: Sun, 23 Aug 2026 19:35:33 +0200 Subject: [PATCH] ci: add a cargo-llvm-cov coverage job Generate an lcov.info report and upload it as a CI artifact so coverage gaps are visible. Reuses the same Arch container and system deps as the check job, with llvm-tools-preview and cargo-llvm-cov installed. Closes #175 --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce0a034..9d73535 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,3 +41,34 @@ jobs: - name: Build release run: cargo build --release + + coverage: + runs-on: ubuntu-latest + container: archlinux:latest + steps: + - uses: actions/checkout@v4 + + - name: System dependencies + run: | + pacman -Syu --noconfirm --needed \ + base-devel \ + gtk4 libadwaita glib2 \ + pkgconf + + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy, llvm-tools-preview + + - uses: taiki-e/install-action@cargo-llvm-cov + + - uses: Swatinem/rust-cache@v2 + + - name: Generate coverage + run: cargo llvm-cov --lcov --output-path lcov.info + + - name: Upload coverage artifact + uses: actions/upload-artifact@v4 + with: + name: lcov-info + path: lcov.info + if-no-files-found: error