2022-01-17 05:07:47 +03:00
|
|
|
name: fmt
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2023-03-16 09:42:34 +03:00
|
|
|
paths:
|
|
|
|
- "**/*.rs"
|
|
|
|
- ".github/workflows/fmt.yml"
|
2022-01-17 05:07:47 +03:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2023-03-16 09:42:34 +03:00
|
|
|
paths:
|
|
|
|
- "**/*.rs"
|
|
|
|
- ".github/workflows/fmt.yml"
|
2022-01-17 05:07:47 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
check-code-formatting:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-04-11 04:34:51 +03:00
|
|
|
uses: actions/checkout@v3
|
2022-01-17 05:07:47 +03:00
|
|
|
- name: "Install Rust"
|
2023-03-24 20:16:09 +03:00
|
|
|
uses: dtolnay/rust-toolchain@nightly
|
2022-01-17 05:07:47 +03:00
|
|
|
with:
|
2022-01-18 01:14:32 +03:00
|
|
|
components: rustfmt
|
2022-01-17 05:07:47 +03:00
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
source $HOME/.cargo/env
|
2022-01-17 23:49:44 +03:00
|
|
|
cargo +nightly fmt --all -- --check
|
2022-01-17 05:07:47 +03:00
|
|
|
|
|
|
|
|