Enforce cargo fmt in CI #185
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: Rust | |
| on: | |
| push: | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Cargo Fmt | |
| run: cargo fmt --all -- --check | |
| build: | |
| name: Rust ${{matrix.rust}} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust: [stable, 1.82.0] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{matrix.rust}} | |
| components: rustfmt | |
| - name: Check bootstrap | |
| run: cargo xtask bootstrap && git diff --exit-code | |
| - name: Run tests | |
| run: cargo test --all | |
| - name: Run tests with trace feature | |
| run: cargo test --all --features trace |