From 3627f4e948dc38aedeedb8230b915a22139b9bcf Mon Sep 17 00:00:00 2001 From: josh rotenberg Date: Fri, 29 Mar 2024 15:30:58 -0700 Subject: [PATCH 1/2] add llvm-cov to template ci move this into the raw block removed the upload section --- template/.github/workflows/ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/template/.github/workflows/ci.yml b/template/.github/workflows/ci.yml index 5aeb63f..5ac7283 100644 --- a/template/.github/workflows/ci.yml +++ b/template/.github/workflows/ci.yml @@ -61,4 +61,19 @@ jobs: env: RUSTDOCFLAGS: -D warnings run: cargo doc --no-deps --document-private-items --all-features --workspace --examples + + coverage: + name: Coverage + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - name: Generate code coverage + run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info {% endraw %} + From d6c58ef98f5a36e58b52274730c3f40283a75413 Mon Sep 17 00:00:00 2001 From: josh rotenberg Date: Sat, 30 Mar 2024 15:55:41 -0700 Subject: [PATCH 2/2] fix(ci): upadte audit action to use rustsec version (#56) add coveralls action --- template/.github/workflows/audit.yml | 7 ++----- template/.github/workflows/ci.yml | 4 ++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/template/.github/workflows/audit.yml b/template/.github/workflows/audit.yml index 64ad0c5..ae5fa22 100644 --- a/template/.github/workflows/audit.yml +++ b/template/.github/workflows/audit.yml @@ -16,11 +16,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - # Ensure that the latest version of Cargo is installed - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable - - uses: Swatinem/rust-cache@v2 - - uses: actions-rs/audit-check@v1 + - name: Run security audit + uses: rustsec/audit-check@v1.4.1 with: token: ${{ secrets.GITHUB_TOKEN }} {% endraw %} diff --git a/template/.github/workflows/ci.yml b/template/.github/workflows/ci.yml index 5ac7283..dfc6b28 100644 --- a/template/.github/workflows/ci.yml +++ b/template/.github/workflows/ci.yml @@ -75,5 +75,9 @@ jobs: uses: taiki-e/install-action@cargo-llvm-cov - name: Generate code coverage run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info + - name: Coveralls + uses: coverallsapp/github-action@v2 + with: + file: lcov.info {% endraw %}