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