From f45c26514270939ea5ee98e17e10f50bf1e1d3f9 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Tue, 8 Oct 2019 19:44:05 +0200 Subject: [PATCH] Use latest nightly with rustfmt for formatting check (#679) Don't fail if current nightly has no rustfmt --- .github/workflows/build-code.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build-code.yml b/.github/workflows/build-code.yml index 15fb71df..a1aedf08 100644 --- a/.github/workflows/build-code.yml +++ b/.github/workflows/build-code.yml @@ -66,5 +66,15 @@ jobs: timeout-minutes: 2 steps: - 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: cargo fmt -- --check