Skip to content

Commit 3218a54

Browse files
Merge pull request #1348 from nicholasbishop/bishop-fmt
ci: Use `cargo xtask fmt --check`
2 parents 092cab1 + e5d5d50 commit 3218a54

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/rust.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,16 @@ jobs:
8888
- name: Checkout sources
8989
uses: actions/checkout@v4
9090
- uses: Swatinem/rust-cache@v2
91-
- name: Run cargo fmt
91+
- name: Install yamlfmt
92+
env:
93+
YFV: "0.13.0"
94+
HASH: "043e96d754a8afa4f4c5c13ffb2f3e50c6be5a70bf53292d3025abc0b42fe4ae"
9295
run: |
93-
rustup component add rustfmt
94-
cargo fmt --all -- --check
96+
curl -L --fail --output /tmp/yamlfmt.tar.xz https://github.com/google/yamlfmt/releases/download/v${YFV}/yamlfmt_${YFV}_Linux_x86_64.tar.gz
97+
echo "${HASH} /tmp/yamlfmt.tar.xz" | sha256sum --check
98+
tar xf /tmp/yamlfmt.tar.xz -C /usr/local/bin yamlfmt
99+
- name: Check formatting
100+
run: cargo xtask fmt --check
95101
- name: Run clippy
96102
run: |
97103
rustup component add clippy
@@ -131,7 +137,6 @@ jobs:
131137
- uses: Swatinem/rust-cache@v2
132138
- name: Build
133139
run: cargo package -p uefi -p uefi-raw -p uefi-macros
134-
135140
# This job requires the nightly channel, but keep it as a separate job from
136141
# `nightly_channel` because it takes a while to run.
137142
build_feature_permutations:

0 commit comments

Comments
 (0)