mirror of
https://github.com/mailscope/kumomta.git
synced 2026-09-08 11:38:56 +00:00
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
name: Check code formatting
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
paths-ignore:
|
|
- "docs/*"
|
|
- ".github/workflows/pages.yml"
|
|
- ".github/workflows/verify-pages.yml"
|
|
- ".github/ISSUE_TEMPLATE/*"
|
|
- "**/*.md"
|
|
- "**/*.markdown"
|
|
- "mkdocs-base.yml"
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
paths-ignore:
|
|
- "docs/*"
|
|
- ".github/workflows/pages.yml"
|
|
- ".github/workflows/verify-pages.yml"
|
|
- ".github/ISSUE_TEMPLATE/*"
|
|
- "**/*.md"
|
|
- "**/*.markdown"
|
|
- "mkdocs-base.yml"
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
check-code-formatting:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: "Install Rust"
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: "minimal"
|
|
toolchain: "nightly"
|
|
override: true
|
|
components: "rustfmt"
|
|
- name: Rust formatting
|
|
run: cargo +nightly fmt --all -- --check
|
|
- name: Install stylua
|
|
uses: baptiste0928/cargo-install@v1
|
|
with:
|
|
crate: stylua
|
|
features: lua54
|
|
- name: Lua formatting
|
|
run: stylua --check --config-path stylua.toml .
|