| 1 | name: ci |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: [main] |
| 6 | pull_request: |
| 7 | |
| 8 | env: |
| 9 | CARGO_TERM_COLOR: always |
| 10 | |
| 11 | jobs: |
| 12 | check: |
| 13 | strategy: |
| 14 | fail-fast: false |
| 15 | matrix: |
| 16 | os: [ubuntu-latest, macos-latest] |
| 17 | runs-on: ${{ matrix.os }} |
| 18 | steps: |
| 19 | - uses: actions/checkout@v5 |
| 20 | - uses: dtolnay/rust-toolchain@stable |
| 21 | with: |
| 22 | components: rustfmt, clippy |
| 23 | - uses: Swatinem/rust-cache@v2 |
| 24 | - run: cargo fmt -- --check |
| 25 | - run: cargo clippy --locked --all-targets -- -D warnings |
| 26 | - run: cargo test --locked |