Test CI #2
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: Lint | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| push: | |
| branches: | |
| - master | |
| permissions: | |
| contents: read | |
| jobs: | |
| rust-lint: | |
| name: Rustfmt + Clippy | |
| runs-on: ubuntu-latest | |
| if: github.event.pull_request.draft == false || github.event_name != 'pull_request' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Rust (stable) with components | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - name: Cache cargo registry and build | |
| uses: Swatinem/rust-cache@v2 | |
| - name: rustfmt check | |
| run: cargo fmt --all -- --check | |
| - name: clippy (deny warnings) | |
| run: | | |
| cargo clippy --all-targets --all-features -- -D warnings |