This GitHub action installs the Rust toolchain specified in the specified toolchain file (rust-toolchain.toml) using dtolnay/rust-toolchain and yq.
- uses: mkroening/rust-toolchain-toml@main
with:
# Path to the toolchain file.
# Default: rust-toolchain.toml
toolchain-file: ''name: test suite
on: [push, pull_request]
jobs:
test:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: mkroening/rust-toolchain-toml@main
- run: cargo test --all-featuresAll inputs are optional.
| Name | Description |
|---|---|
toolchain-file |
Path to a rust-toolchain.toml.
|
toolchain |
Rustup toolchain specifier e.g. stable, nightly, 1.42.0, nightly-2022-01-01.
|
targets |
Comma-separated string of additional targets to install e.g. wasm32-unknown-unknown |
components |
Comma-separated string of additional components to install e.g. clippy, rustfmt |
| Name | Description |
|---|---|
cachekey |
A short hash of the installed rustc version, appropriate for use as a cache key. "20220627a831" |
name |
Rustup's name for the selected version of the toolchain, like "1.62.0". Suitable for use with cargo +${{steps.toolchain.outputs.name}}. |
The scripts and documentation in this project are released under the MIT License.