Github actions tweaks #12
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: Sanity Check | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| jobs: | |
| fmt: | |
| name: Run Rustfmt | |
| runs-on: warp-ubuntu-latest-x64-32x | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Cache Rust toolchain | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.rustup | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-rust-nightly-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Set up Rust Nightly | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: nightly | |
| override: false | |
| components: rustfmt | |
| - name: Run Rustfmt with nightly | |
| run: cargo +nightly fmt --all -- --check | |
| clippy: | |
| name: Run Clippy | |
| runs-on: warp-ubuntu-latest-x64-32x | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Cache Rust toolchain | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.rustup | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-rust-stable-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Set up Rust Stable | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| components: clippy | |
| - name: Run Clippy with stable | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| test: | |
| name: Run Tests | |
| runs-on: warp-ubuntu-latest-x64-32x | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Cache Rust toolchain | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.rustup | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-rust-stable-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Set up Rust Stable | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - name: Run tests with stable | |
| run: cargo test --all-targets --all-features |