From 18811c14e25d9806cd91bede15b061dd3ac51084 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Sat, 13 Jan 2024 04:53:25 +0000 Subject: [PATCH 1/3] add test coverage workflow --- .github/workflows/coverage.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 000000000..92f1e04ed --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,30 @@ +on: + push: + branches: [master] + pull_request: + +name: Code Coverage + +jobs: + coverage: + name: coverage + runs-on: ubuntu-latest + steps: + - name: checkout source + uses: actions/checkout@v4 + + - name: Install nightly toolchain + uses: dtolnay/rust-toolchain@nightly + with: + components: llvm-tools-preview + + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + + - name: Run llvm-cov + run: cargo llvm-cov --all-features --doctests --workspace --lcov --output-path lcov.info + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + files: lcov.info From 3d2a8e7abcaaa7e058f817be1d591eca4e78405b Mon Sep 17 00:00:00 2001 From: danieleades <33452915+danieleades@users.noreply.github.com> Date: Thu, 18 Jan 2024 08:52:14 +0000 Subject: [PATCH 2/3] Update coverage.yml --- .github/workflows/coverage.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 92f1e04ed..735e5cd22 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,12 +1,18 @@ on: push: branches: [master] + paths-ignore: + - "**.md" pull_request: + paths-ignore: + - "**.md" name: Code Coverage jobs: coverage: + # Don't run coverage on merge queue CI to avoid duplicating codecov reports + if: github.event_name != 'merge_group' name: coverage runs-on: ubuntu-latest steps: From 2122d3e96238ed52f73517177e55d063550ed265 Mon Sep 17 00:00:00 2001 From: danieleades <33452915+danieleades@users.noreply.github.com> Date: Thu, 18 Jan 2024 09:16:48 +0000 Subject: [PATCH 3/3] Update coverage.yml --- .github/workflows/coverage.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 735e5cd22..42c7b300b 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -11,8 +11,6 @@ name: Code Coverage jobs: coverage: - # Don't run coverage on merge queue CI to avoid duplicating codecov reports - if: github.event_name != 'merge_group' name: coverage runs-on: ubuntu-latest steps: