mirror of
https://github.com/NLnetLabs/krill.git
synced 2026-09-20 08:27:49 +02:00
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
name: Coverage
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ["CI"]
|
|
types:
|
|
- completed
|
|
|
|
jobs:
|
|
coverage:
|
|
name: coverage
|
|
if: >
|
|
${{ (github.event.workflow_run.event == 'pull_request' || github.event.workflow_run.event == 'push') &&
|
|
github.event.workflow_run.conclusion == 'success' }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
rust: [stable]
|
|
args: ["", "--all-features"]
|
|
steps:
|
|
- name: Checkout PR commit
|
|
if: ${{ github.event.workflow_run.event == 'pull_request' }}
|
|
uses: actions/checkout@v1
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
- name: Checkout push commit
|
|
if: ${{ github.event.workflow_run.event == 'push' }}
|
|
uses: actions/checkout@v1
|
|
with:
|
|
ref: $GITHUB_SHA
|
|
- 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
|
|
|