From b10368bdaaef38d909e759e8a29953a8cf2178a9 Mon Sep 17 00:00:00 2001 From: Ximon Eighteen <3304436+ximon18@users.noreply.github.com> Date: Thu, 14 Jan 2021 13:10:27 +0100 Subject: [PATCH] Copy the new coverage.yml workflow for #377 to master so that GitHub Actions creates the new coverage workflow. --- .github/workflows/coverage.yml | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 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 00000000..119e6ad2 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,36 @@ +name: Coverage + +on: + workflow_run: + workflows: ["CI"] + types: + - completed + +jobs: + coverage: + name: coverage + if: ${{ github.event.workflow_run.conclusion == 'success' }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + rust: [stable] + args: ["", "--all-features"] + steps: + - name: Checkout repository + uses: actions/checkout@v1 + - name: Install Rust + uses: hecrj/setup-rust-action@v1 + with: + rust-version: ${{ matrix.rust }} + - run: cargo install cargo-tarpaulin + # use a long timeout with tarpaulin as UI tests have to docker pull the + # cypress.io image which can cause a test timeout with the default tarpaulin + # timeout of 1 minute. + - run: cargo tarpaulin --verbose --out Html --timeout 180 ${{ matrix.args }} + - name: Archive code coverage results + uses: actions/upload-artifact@v2 + with: + name: code-coverage-report ${{ matrix.os }} ${{ matrix.rust }} ${{ matrix.args }} + path: tarpaulin-report.html +