-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (45 loc) · 1.4 KB
/
ci.yml
File metadata and controls
59 lines (45 loc) · 1.4 KB
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
59
name: CI
on:
pull_request:
branches: [main]
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # stable
with:
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@23869a5bd66c73db3c0ac40331f3206eb23791dc # v2.9.1
- name: Format check
run: cargo fmt --check
- name: Clippy
run: cargo clippy --all-targets
env:
RUSTFLAGS: "-Dwarnings"
- name: Clippy (candle)
run: cargo clippy --all-targets --features candle
env:
RUSTFLAGS: "-Dwarnings"
- name: Build
run: cargo build
- name: Build (candle)
run: cargo build --features candle
- name: Test
run: cargo test
- name: Test (candle)
run: cargo test --features candle
- name: Security audit
run: cargo install cargo-audit --locked && cargo audit
- name: Install rustqual
run: cargo install rustqual
- name: Quality analysis
# Scan the whole repository (src/, tests/, benches/, examples/)
# so that test-code quality issues are not silently ignored.
run: rustqual . --fail-on-warnings