From 71729e6de89eff6ff3829d028dc2421d6f7de9d3 Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Sun, 19 Nov 2023 17:56:04 +0000 Subject: [PATCH] Don't run CI tests when computing coverage We are running out of disk space. --- .github/workflows/coverage.yml | 26 +++++++------------------- cargo-dylint/tests/ci.rs | 2 ++ 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index ed5eccd82..4ca33c9f4 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -21,28 +21,16 @@ jobs: with: ssh-key: ${{ secrets.PR_SSH_KEY }} - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - ~/.dylint_drivers/ - ~/.rustup/toolchains/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - name: Install dylint-link run: cargo install --path ./dylint-link - - name: Install tools + - name: Free up space on Ubuntu run: | - npm install -g prettier - rustup install nightly - cargo install cargo-hack || true - cargo install cargo-msrv || true - cargo install cargo-supply-chain || true - cargo install cargo-udeps || true + # https://github.com/actions/runner-images/issues/2606#issuecomment-772683150 + sudo rm -rf /usr/local/lib/android + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/share/swift + # du -sh /usr/*/* 2>/dev/null | sort -h || true - name: Install cargo-llvm-cov run: cargo install cargo-llvm-cov @@ -51,7 +39,7 @@ jobs: run: | for X in . driver utils/linting; do pushd "$X" - cargo llvm-cov --failure-mode all --lcov --output-path coverage.lcov + cargo llvm-cov --workspace --exclude examples --failure-mode all --lcov --output-path coverage.lcov popd done diff --git a/cargo-dylint/tests/ci.rs b/cargo-dylint/tests/ci.rs index d8eb8220c..e05ceb661 100644 --- a/cargo-dylint/tests/ci.rs +++ b/cargo-dylint/tests/ci.rs @@ -1,3 +1,5 @@ +#![cfg(not(coverage))] + use anyhow::Result; use assert_cmd::Command; use cargo_metadata::{Dependency, Metadata, MetadataCommand};