-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.39 KB
/
Copy pathcoverage.yml
File metadata and controls
52 lines (43 loc) · 1.39 KB
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
---
name: Coverage
"on":
pull_request:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
CARGO_TERM_COLOR: always
jobs:
coverage:
name: Coverage
runs-on: ubuntu-latest
timeout-minutes: 30
# Neither a fork's pull request nor a Dependabot run can read CODECOV_TOKEN.
if: >-
github.event_name == 'push' ||
(github.event.pull_request.head.repo.full_name == github.repository &&
github.event.pull_request.user.login != 'dependabot[bot]')
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install stable toolchain with llvm-tools
run: |
rustup toolchain install stable \
--profile minimal \
--component llvm-tools-preview
- uses: taiki-e/install-action@7623a79cdfecb99d681017af368ca353d9f49bb5 # v2.87.19
with:
tool: cargo-llvm-cov
- name: Test coverage
run: cargo +stable llvm-cov --all-targets --codecov --output-path codecov.json
- uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
with:
files: codecov.json
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true