-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (44 loc) · 1.15 KB
/
ci.yml
File metadata and controls
52 lines (44 loc) · 1.15 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
name: CI
on:
push:
branches:
- main
tags:
- "*"
pull_request:
jobs:
ci:
name: Rust CI
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# Force correct Rust version
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.88.0
components: rustfmt, clippy
override: true
- name: Check rustc version
run: rustc --version
- name: Cache Cargo registry & target
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-cache-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install cargo-deny (fast)
uses: taiki-e/install-action@v2
with:
tool: cargo-deny
version: 0.18.5
- name: Run CI checks
run: |
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all --all-features --verbose
cargo deny check licenses bans sources