| 1 | name: CI |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: [main] |
| 6 | pull_request: |
| 7 | branches: [main] |
| 8 | |
| 9 | jobs: |
| 10 | ci: |
| 11 | runs-on: ubuntu-latest |
| 12 | steps: |
| 13 | - uses: actions/checkout@v4 |
| 14 | |
| 15 | - uses: dtolnay/rust-toolchain@stable |
| 16 | with: |
| 17 | components: rustfmt, clippy |
| 18 | |
| 19 | - uses: Swatinem/rust-cache@v2 |
| 20 | |
| 21 | - name: Format |
| 22 | run: cargo fmt --all -- --check |
| 23 | |
| 24 | - name: Lint |
| 25 | run: cargo clippy --all-targets --all-features -- -D warnings |
