Code Formatting Check #313
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code Formatting Check | |
on: | |
push: | |
pull_request: | |
merge_group: | |
schedule: # Trigger a job on default branch at 4AM PST everyday | |
- cron: 0 11 * * * | |
jobs: | |
cargo-fmt: | |
name: .rs Formatting Check | |
runs-on: windows-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Rust Toolchain (Nightly) | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- name: Run Cargo Format | |
run: cargo +nightly fmt --all -- --check | |
taplo-fmt: | |
name: .toml Formatting Check | |
runs-on: windows-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Rust Toolchain (Stable) | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install taplo-cli | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: taplo-cli | |
- run: taplo fmt --check --diff | |
name: Check TOML files formatting |