-
Notifications
You must be signed in to change notification settings - Fork 226
37 lines (34 loc) · 1.05 KB
/
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
name: Code Coverage
on:
push:
branches:
- master
paths-ignore:
- '**.md'
- '**.png'
env:
RUST_TOOLCHAIN: nightly
TOOLCHAIN_PROFILE: minimal
jobs:
coverage:
name: Run cargo coverage
runs-on: ubuntu-latest
environment: coverage
env:
CARGO_TERM_COLOR: always
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: ${{ env.TOOLCHAIN_PROFILE }}
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: sudo bash -c "ulimit -Sl 512 && ulimit -Hl 512 && sudo -u runner /home/runner/.cargo/bin/cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info"
- name: Upload coverage to Codecov
run: bash <(curl -s https://codecov.io/bash) -f lcov.info -t ${{ secrets.CODECOV_TOKEN }}