-
Notifications
You must be signed in to change notification settings - Fork 34
47 lines (40 loc) · 1.41 KB
/
codecov.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
on:
push:
branches:
- main
pull_request:
env:
CI_TWITCH_API_FEATURES: "twitch_oauth2/all all unsupported deny_unknown_fields ureq"
name: Code Coverage
jobs:
coverage:
name: Run test coverage
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Toolchain setup
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage for tests
run: cargo llvm-cov --no-report --tests --features "${{ env.CI_TWITCH_API_FEATURES }} _all trace_unknown_fields"
- name: Generate code coverage for tests without any features
run: cargo llvm-cov --no-report --tests
# doctests take too long to complete
# - name: Generate code coverage for docs
# run: cargo llvm-cov --no-report --doc --features "${{ env.CI_TWITCH_API_FEATURES }} _all"
- name: Merge lcov.info
run: cargo llvm-cov report --lcov --ignore-filename-regex "twitch_oauth2" --output-path lcov.info
- name: Upload to codecov.io
uses: codecov/codecov-action@v5
with:
files: ./lcov.info
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}