38 lines
726 B
YAML
38 lines
726 B
YAML
name: fmt
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "**/*.rs"
|
|
- ".github/workflows/fmt.yml"
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "**/*.rs"
|
|
- ".github/workflows/fmt.yml"
|
|
|
|
jobs:
|
|
check-code-formatting:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: "Install Rust"
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: "minimal"
|
|
toolchain: "nightly"
|
|
override: true
|
|
components: rustfmt
|
|
env:
|
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
|
- name: Build
|
|
run: |
|
|
source $HOME/.cargo/env
|
|
cargo +nightly fmt --all -- --check
|
|
|
|
|