-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (39 loc) · 1.08 KB
/
ci.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
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
RUST_BACKTRACE: full
steps:
- uses: actions/checkout@v3
- name: Lint
run: cargo clippy --all-features -- -D warnings
- name: Test
run: cargo test --all-targets --all-features
- name: Build
run: cargo build --all-targets --all-features
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Generate code coverage
shell: bash
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
cargo llvm-cov --ignore-filename-regex cli.rs --lcov --output-path lcov.info
- name: Upload coverage to Codecov
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v4
with:
files: lcov.info
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}