Implement Toolchain Manager #28
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # https://github.com/actions/cache/blob/main/examples.md#rust---cargo | |
| # Depends on `Cargo.lock` --> Has to be after checkout. | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Install Rust | |
| run: rustup toolchain install nightly --no-self-update --profile minimal --component rust-src,rustfmt,clippy | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Run tests | |
| run: cargo test --all-features --all-targets | |
| - name: Run clippy | |
| run: cargo clippy --all-features --all-targets -- --deny warnings |