-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.15 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
44
45
46
47
48
on:
push:
branches:
- 'main'
name: CI
jobs:
build_and_test:
name: Build & Test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
rust:
- .github/workflows/ci.yml
- ./**/*.rs
- Cargo.toml
- Cargo.lock
- uses: dtolnay/rust-toolchain@stable
if: steps.changes.outputs.rust == 'true'
with:
components: llvm-tools-preview
- uses: taiki-e/install-action@cargo-llvm-cov
if: steps.changes.outputs.rust == 'true'
- name: build
if: steps.changes.outputs.rust == 'true'
run: cargo build --verbose
- name: tests with coverage
if: steps.changes.outputs.rust == 'true'
run: |
cargo llvm-cov
cargo llvm-cov report --lcov --output-path lcov.info
- name: Upload coverage reports to Codecov
if: steps.changes.outputs.rust == 'true'
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info