-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (41 loc) · 1.06 KB
/
cargo.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
name: Rust
# Run either when pushing directly to main/master or in a PR targeting main/master
on:
push:
branches:
- master
- main
paths:
- "**.rs"
- "rust/Cargo.lock"
- "rust/Cargo.toml"
- ".github/workflows/cargo.yml"
pull_request:
branches:
- master
- main
# https://github.com/actions-rs/cargo
jobs:
cargo:
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v4
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/[email protected]
with:
workspaces: ./rust -> target
- name: fmt
working-directory: rust
# workaround for color output
env:
TERM: xterm-256color
run: cargo fmt --check --verbose
- name: clippy
working-directory: rust
env:
TERM: xterm-256color
# exit non-zero if there are any warnings
# https://doc.rust-lang.org/stable/clippy/usage.html
run: cargo clippy -- -Dwarnings