Add cargo fmt and cargo clippy to CI workflows #562
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: Check Fortuna | |
| on: | |
| pull_request: | |
| paths: | |
| - .github/workflows/ci-fortuna.yml | |
| - apps/fortuna/** | |
| push: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: "apps/fortuna -> target" | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: 1.82.0 | |
| override: true | |
| - name: Format check | |
| run: cargo fmt --all -- --check | |
| if: success() || failure() | |
| - name: Clippy check | |
| run: cargo clippy --tests -- --deny warnings | |
| if: success() || failure() | |
| - name: Run executor tests | |
| run: cargo test | |
| if: success() || failure() |