From 7efde421c85f6b2bf462cd6a01be12d0a82fe676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lena=20Hellstr=C3=B6m?= Date: Thu, 16 Apr 2020 15:51:41 -0700 Subject: [PATCH] add code coverage (#313) --- .github/workflows/rust.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 916c6bb..a98d415 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -93,3 +93,33 @@ jobs: command: clippy args: -- -D warnings name: Run `cargo clippy` + + coverage: + name: Code Coverage + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + name: Checkout + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + name: Install Rust nightly + + - name: Run cargo-tarpaulin + uses: actions-rs/tarpaulin@v0.1 + with: + version: '0.12.3' + args: '--ignore-tests -- --test-threads 1' + + - name: Upload to codecov.io + uses: codecov/codecov-action@v1 + + - name: Archive code coverage results + uses: actions/upload-artifact@v1 + with: + name: code-coverage-report + path: cobertura.xml +