forked from betrusted-io/xous-core
-
Notifications
You must be signed in to change notification settings - Fork 0
27 lines (22 loc) · 950 Bytes
/
rustfmt_check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# 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 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin main
git checkout origin/main rustfmt.toml
- name: Generate dummy templates so formating checks don't choke on missing xtask-generated files
run: cargo xtask dummy-template
- name: Run cargo +nightly fmt --check
run: cargo +nightly fmt --check
- run: echo "status = ${{ job.status }}"