-
-
Notifications
You must be signed in to change notification settings - Fork 33
48 lines (45 loc) · 1.05 KB
/
fmt.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
name: Check code formatting
on:
push:
branches: [ "main" ]
paths:
- "**/*.rs"
- "**/*.lua"
- ".github/workflows/fmt.yml"
- "**/Cargo.toml"
- "stylua.toml"
- ".rustfmt.toml"
pull_request:
branches: [ "main" ]
paths:
- "**/*.rs"
- "**/*.lua"
- ".github/workflows/fmt.yml"
- "**/Cargo.toml"
- "stylua.toml"
- ".rustfmt.toml"
env:
CARGO_TERM_COLOR: always
jobs:
check-code-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Install Rust"
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: rustfmt
- name: Rust formatting
run: cargo +nightly fmt --all -- --check
- name: "Install Rust"
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Install stylua
uses: baptiste0928/cargo-install@v3
with:
crate: stylua
features: lua54
- name: Lua formatting
run: stylua --check --config-path stylua.toml .