From 845f6d7c05f6ddbce368de0c3713a450624abfd2 Mon Sep 17 00:00:00 2001 From: Art <4998038+Alorel@users.noreply.github.com> Date: Tue, 26 Sep 2023 22:28:10 +0100 Subject: [PATCH] ci: Report coverage --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 35 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e502ba3..3bda8e2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,6 +54,39 @@ jobs: - name: cargo-rdme uses: alorel-actions/cargo/rdme@v1 + nightly-test: + name: Rust nightly + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Init toolchain + uses: alorel-actions/cargo/init@v1 + with: + toolchain: nightly-2023-09-18 + cache-prefix: test + local: true + components: llvm-tools-preview + + - name: Examples & unit tests + uses: alorel-actions/cargo/llvm-cov@v1 + with: + output: unit.lcov + args: --lcov --examples --tests --workspace + + - name: Doc tests + uses: alorel-actions/cargo/llvm-cov@v1 + with: + output: doc.lcov + args: --lcov --doctests --workspace + + - name: Upload coverage + uses: coverallsapp/github-action@v2 + continue-on-error: true + with: + files: unit.lcov doc.lcov + test: name: Rust ${{matrix.toolchain}} runs-on: ubuntu-latest @@ -88,6 +121,7 @@ jobs: needs: - test - lint + - nightly-test permissions: contents: write steps: diff --git a/.gitignore b/.gitignore index b83d222..1d95086 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /target/ +/*.lcov