| 1 | name: Rust toolchain |
| 2 | on: |
| 3 | workflow_dispatch: |
| 4 | jobs: |
| 5 | check: |
| 6 | runs-on: ubuntu-latest |
| 7 | steps: |
| 8 | - uses: dtolnay/rust-toolchain@stable |
| 9 | with: |
| 10 | components: rustfmt, clippy |
| 11 | - uses: actions/cache@v6 |
| 12 | with: |
| 13 | path: | |
| 14 | ~/.cargo/registry |
| 15 | ~/.cargo/git |
| 16 | key: cargo-${{ runner.os }}-demo |
| 17 | - run: | |
| 18 | cargo new --quiet /tmp/demo |
| 19 | cd /tmp/demo |
| 20 | cargo fmt --check |
| 21 | cargo clippy --quiet -- -D warnings |
| 22 | cargo test --quiet |
| 23 | rustc --version |