xous-core/.github/workflows/rustfmt_check.yml
bunnie ca5845c2f6 checkout the main rustfmt.toml prior to running CI
this is necessary so that patches can't sneak through by
modifying rustfmt.toml to bypass a CI checke.
2024-01-11 21:24:14 +08:00

22 lines
No EOL
697 B
YAML

# From https://github.com/samblenny/autofmt-demo/blob/main/.github/workflows/rustfmt_check.yml
name: rustfmt_check
on: push
jobs:
rustfmt_check:
runs-on: ubuntu-latest
steps:
- name: Check out branch source
uses: actions/checkout@v4
- name: Install rustfmt from nightly toolchain
run: |
rustup toolchain install nightly
rustup component add rustfmt --toolchain nightly
- name: Ensure the `main` branch rustfmt is applied for the run
run: git checkout main rustfmt.toml
- name: Run cargo +nightly fmt --check
run: cargo +nightly fmt --check
- run: echo "status = ${{ job.status }}"