1+ name : Rust CI
2+
3+ on :
4+ push :
5+ branches : [canary]
6+ pull_request :
7+ branches : [canary]
8+ types : [opened, synchronize, reopened, ready_for_review]
9+ workflow_dispatch :
10+
11+ # Cancel the old workflow running in the same group
12+ concurrency :
13+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
14+ cancel-in-progress : true
15+
16+ env :
17+ CARGO_TERM_COLOR : always
18+ RUSTFLAGS : " -Dwarnings"
19+
20+ jobs :
21+ check :
22+ name : Check
23+ runs-on : ubuntu-latest
24+ steps :
25+ - uses : actions/checkout@v6
26+ - uses : jdx/mise-action@v3.5.1
27+ with :
28+ github_token : ${{ secrets.GITHUB_TOKEN }}
29+
30+ - name : Check workspace
31+ run : cargo check
32+
33+ fmt :
34+ name : Rustfmt
35+ runs-on : ubuntu-latest
36+ steps :
37+ - uses : actions/checkout@v6
38+ - uses : jdx/mise-action@v3.5.1
39+ with :
40+ github_token : ${{ secrets.GITHUB_TOKEN }}
41+
42+ - name : Setup rustfmt
43+ run : rustup component add rustfmt
44+
45+ - name : Check formatting
46+ run : mise run //crates:fmt
47+
48+ clippy :
49+ name : Clippy
50+ runs-on : ubuntu-latest
51+ steps :
52+ - uses : actions/checkout@v6
53+ - uses : jdx/mise-action@v3.5.1
54+ with :
55+ github_token : ${{ secrets.GITHUB_TOKEN }}
56+
57+ - name : Setup clippy
58+ run : rustup component add clippy
59+
60+ - name : Run clippy
61+ run : cargo clippy --all-targets
62+
63+ # test:
64+ # name: Test
65+ # runs-on: ubuntu-latest
66+ # steps:
67+ # - uses: actions/checkout@v6
68+ # - uses: jdx/mise-action@v3.5.1
69+ # with:
70+ # github_token: ${{ secrets.GITHUB_TOKEN }}
71+
72+ # - name: Run tests
73+ # run: cargo test --lib --tests
74+
75+ build :
76+ name : Build
77+ runs-on : ubuntu-latest
78+ steps :
79+ - uses : mozilla-actions/sccache-action@v0.0.9
80+ - uses : actions/checkout@v6
81+ - uses : jdx/mise-action@v3.5.1
82+ with :
83+ github_token : ${{ secrets.GITHUB_TOKEN }}
84+
85+ - name : Build workspace
86+ run : cargo build
0 commit comments