mirror of
https://github.com/mailscope/kumomta.git
synced 2026-09-05 02:08:18 +00:00
45 lines
969 B
YAML
45 lines
969 B
YAML
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@v3
|
|
- name: "Install Rust"
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: nightly
|
|
components: rustfmt
|
|
- name: Rust formatting
|
|
run: cargo +nightly fmt --all -- --check
|
|
- name: Install stylua
|
|
uses: baptiste0928/cargo-install@v2
|
|
with:
|
|
crate: stylua
|
|
features: lua54
|
|
- name: Lua formatting
|
|
run: stylua --check --config-path stylua.toml .
|