From 1f6a2a839196616ca02e1f6c64e4a27fdbfb50d4 Mon Sep 17 00:00:00 2001 From: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> Date: Thu, 25 Nov 2021 20:40:13 -0500 Subject: [PATCH] ci: add codecov (#608) Adds codecov to the workflow suite. --- .github/workflows/codecov.yml | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 00000000..615a6de3 --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,40 @@ +# Codecov generation via cargo-tarpaulin. + +name: coverage + +on: + workflow_dispatch: + push: + branches: + - master + paths-ignore: + - "README.md" + - "docs/**" + - ".github/ISSUE_TEMPLATE/**" + - "CHANGELOG.md" + - "CONTRIBUTING.md" + +jobs: + test: + name: coverage + runs-on: ubuntu-latest + container: + image: xd009642/tarpaulin:develop + options: --security-opt seccomp=unconfined + + steps: + - uses: actions/checkout@v2 + + - uses: Swatinem/rust-cache@v1 + with: + key: ${{ matrix.triple.target }} + + - name: Generate code coverage + run: | + cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out Xml + + - name: Upload to codecov.io + uses: codecov/codecov-action@v2 + with: + token: ${{secrets.CODECOV_TOKEN}} + fail_ci_if_error: true