-
Notifications
You must be signed in to change notification settings - Fork 1.3k
61 lines (54 loc) · 1.58 KB
/
default.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
49
50
51
52
53
54
55
56
57
58
name: Avail Light CI
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
workflow_dispatch:
jobs:
formatting:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: Check Rust formatting
uses: actions-rust-lang/rustfmt@v1
- name: Check TOML, JSON, and MarkDown formatting
uses: dprint/check@v2.1
clippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy
- run: cargo clippy --workspace -- -D warnings
test:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: arduino/setup-protoc@v2
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo test --workspace --benches --tests
env:
RUSTFLAGS: "-C instrument-coverage"
LLVM_PROFILE_FILE: "profile-%p-%m.profraw"
- name: Install grcov
run: cargo +stable install --force grcov
- name: Generate test code coverage report
run: grcov . -s . --binary-path ./target/debug/ -t lcov --branch --ignore-not-existing -o lcov.info
- name: Upload test code coverage report to codecov.io
uses: codecov/codecov-action@v2
with:
files: lcov.info
- name: Cleanup
run: find . -name \*.profraw -type f -exec rm -f {} +