-
-
Notifications
You must be signed in to change notification settings - Fork 7
51 lines (50 loc) · 1.6 KB
/
coverage.yml
File metadata and controls
51 lines (50 loc) · 1.6 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
name: Coverage
on:
pull_request:
paths:
- '**.rs'
- '.github/workflows/coverage.yml'
push:
paths:
- '**.rs'
- '.github/workflows/coverage.yml'
permissions:
contents: read
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
with:
egress-policy: block
allowed-endpoints: >
api.github.com:443
cli.codecov.io:443
codecov.io:443
crates.io:443
github.com:443
index.crates.io:443
kv4gacprodeus2file3.blob.core.windows.net:443
objects.githubusercontent.com:443
static.crates.io:443
static.rust-lang.org:443
storage.googleapis.com:443
uploader.codecov.io:443
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@f916cfac5d8efd040e250d0cd6b967616504b3a4 # v2.68.32
with:
tool: cargo-llvm-cov
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libmagic-dev
- name: Generate code coverage
run: cargo llvm-cov --features=sqlite --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: false