Skip to content

Commit f26d443

Browse files
committed
Use rust-components-nightly action for checking formatting
Ensures that the test doesn't fail if the lastest nightly has no rustfmt.
1 parent 29cd6ea commit f26d443

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,5 +124,15 @@ jobs:
124124
timeout-minutes: 2
125125
steps:
126126
- uses: actions/checkout@v1
127+
- name: "Find latest Nightly with rustfmt"
128+
id: component
129+
uses: actions-rs/components-nightly@v1
130+
with:
131+
component: rustfmt
132+
- name: "Add a rustup override for rustfmt nightly"
133+
uses: actions-rs/toolchain@v1
134+
with:
135+
toolchain: ${{ steps.component.outputs.toolchain }}
136+
override: true
127137
- run: rustup component add rustfmt
128138
- run: cargo fmt -- --check

0 commit comments

Comments
 (0)