-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (43 loc) · 1.4 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
49
50
51
52
53
54
name: ci
on:
pull_request:
push:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
GH_USER: ${{ github.repository_owner }}
GH_TOKEN: ${{ secrets.GH_PRIVATE_TOKEN }}
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
- name: Cache rust build files
uses: Leafwing-Studios/cargo-cache@c7e8aa40ae2c975774d3bd766beb92927cfd7771 # v1
- name: check (release)
run: cargo check --workspace --all-targets --all-features --release
- name: clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings --force-warn deprecated --force-warn dead-code
- name: unit-tests
run: cargo test --all-features --lib
format:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
components: rustfmt
- run: cargo +nightly fmt --all -- --check