Skip to content

fix: move cargo-wdk output to stderr (#599) #3810

fix: move cargo-wdk output to stderr (#599)

fix: move cargo-wdk output to stderr (#599) #3810

name: Code Formatting Check
on:
push:
branches-ignore:
- 'gh-readonly-queue/**'
pull_request:
merge_group:
schedule: # Trigger a job on default branch at 4AM PST everyday
- cron: 0 11 * * *
concurrency:
group: ${{ github.workflow }}-${{ github.event.compare || github.head_ref || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
cargo-fmt:
name: .rs Formatting Check
runs-on: windows-2025
steps:
- name: Checkout Repository
uses: actions/checkout@v5
- 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-2025
steps:
- name: Checkout Repository
uses: actions/checkout@v5
- 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
cargo-sort:
name: Check Dependencies are sorted lexicographically
runs-on: windows-2025
steps:
- name: Checkout Repository
uses: actions/checkout@v5
- name: Install Rust Toolchain (Stable)
uses: dtolnay/rust-toolchain@stable
# Installing cargo-sort from main branch since there is an unreleased fix
# Ref: https://github.com/DevinR528/cargo-sort/issues/67#issuecomment-2486868511
- name: Install cargo-sort binary from specific branch
run: cargo install --git=https://github.com/DevinR528/cargo-sort cargo-sort --branch main --rev 4a1ecf093649b87fa610aec32a1bdaa4829d416b --locked --force
# -w for every crate in workspace, -g for keeping blank lines when sorting groups of deps,
# -n do not run formatting, --check to only check without modifying files
- run: cargo sort -g -w -n --check
name: Check if dependencies in Cargo.toml are sorted