-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (48 loc) · 1.47 KB
/
code-coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# SPDX-FileCopyrightText: 2021-2023 Eduardo Robles <edu@sequentech.io>
# SPDX-FileCopyrightText: 2022 Félix Robles <felix@sequentech.io>
#
# SPDX-License-Identifier: AGPL-3.0-only
name: Coverage
on:
workflow_call:
inputs:
# This input is not used yet, but making it future proof, when we use nix
# cache for this action.
cachix-auth-identity:
description: 'Name of a cachix cache to push and pull/substitute'
required: true
type: string
secrets:
# This secret is not used yet, but making it future proof, when we use nix
# cache for this action.
cachix-auth-token:
required: true
jobs:
# based on https://github.com/actions-rs/example
coverage:
name: Test Coverage
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1
continue-on-error: true
with:
version: '0.15.0'
args: '-- --test-threads 4'
- uses: codecov/codecov-action@v3
with:
fail_ci_if_error: True
verbose: true
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: cobertura.xml