Use latest nightly with rustfmt for formatting check (#679)

Don't fail if current nightly has no rustfmt
This commit is contained in:
Philipp Oppermann
2019-10-08 19:44:05 +02:00
committed by GitHub
parent 36a85b2d66
commit f45c265142

View File

@@ -66,5 +66,15 @@ jobs:
timeout-minutes: 2 timeout-minutes: 2
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: "Find latest Nightly with rustfmt"
id: component
uses: actions-rs/components-nightly@v1
with:
component: rustfmt
- name: "Add a rustup override for rustfmt nightly"
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ steps.component.outputs.toolchain }}
override: true
- run: rustup component add rustfmt - run: rustup component add rustfmt
- run: cargo fmt -- --check - run: cargo fmt -- --check