-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (47 loc) · 1.27 KB
/
rust.yml
File metadata and controls
51 lines (47 loc) · 1.27 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
name: rust
permissions:
contents: read
on:
push:
branches: [main]
paths:
- "chronosynd-rs/**"
- ".github/workflows/rust.yml"
pull_request:
paths:
- "chronosynd-rs/**"
- ".github/workflows/rust.yml"
jobs:
check:
name: cargo check + clippy + fmt
runs-on: ubuntu-24.04
defaults:
run:
working-directory: chronosynd-rs
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable @ 2026-04-26
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: chronosynd-rs -> target
- name: fmt
run: cargo fmt --all -- --check
- name: clippy
run: cargo clippy --workspace --all-targets -- -D warnings
- name: check
run: cargo check --workspace --all-targets
test:
name: cargo test
runs-on: ubuntu-24.04
defaults:
run:
working-directory: chronosynd-rs
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable @ 2026-04-26
- uses: Swatinem/rust-cache@v2
with:
workspaces: chronosynd-rs -> target
- run: cargo test --workspace