diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9a84a8f..c117dc2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -23,13 +23,16 @@ jobs: ~/.cargo/registry ~/.cargo/git target - key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain') }}-${{ hashFiles('Cargo.lock') }} + key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }}-${{ hashFiles('Cargo.lock') }} restore-keys: | - ${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain') }}-${{ hashFiles('Cargo.lock') }} - ${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain') }}- + ${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }}-${{ hashFiles('Cargo.lock') }} + ${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain.toml') }}- - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable + # This installs the toolchain specified in `rust-toolchain.toml`. + # There's no need to set it as the default toolchain since all + # rustup shims respect the aforementioned toolchain file. + run: rustup install - name: Install just uses: taiki-e/install-action@just diff --git a/rust-toolchain b/rust-toolchain deleted file mode 100644 index f288d11..0000000 --- a/rust-toolchain +++ /dev/null @@ -1 +0,0 @@ -1.85.0 diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..b475f2f --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "1.85.0" +components = ["rustfmt", "clippy"]