Skip to content

Commit

Permalink
Tweaks base on the old Krill coverage workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
ximon18 authored Nov 16, 2023
1 parent bf2ea05 commit 71f5f5b
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
name: coverage

on:
push:
branches:
main

pull_request:
workflow_run:
workflows: ["ci"]
types:
- completed

workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: self-hosted
coverage:
name: coverage
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3
with:
# at the time of writing workflow_run.head_commit.id appears to be
# the commit that triggered the CI workflow which then triggered us.
ref: ${{ github.event.workflow_run.head_commit.id }}

- name: Ensure correct Rust toolchain version
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- run: cargo install cargo-tarpaulin

- name: Run cargo-tarpaulin
uses: actions-rs/[email protected]
with:
version: '0.27.1'
out-type: Html
- run: cargo tarpaulin --verbose --out Html

- name: Archive code coverage results
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v2
with:
name: code-coverage-report
path: tarpaulin-report.html

0 comments on commit 71f5f5b

Please sign in to comment.