diff --git a/.github/workflows/build-code.yml b/.github/workflows/build-code.yml index 0aa4e7bb..d2de346a 100644 --- a/.github/workflows/build-code.yml +++ b/.github/workflows/build-code.yml @@ -86,5 +86,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