| 1 | name: CI |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: [trunk] |
| 6 | pull_request: |
| 7 | branches: [trunk] |
| 8 | |
| 9 | env: |
| 10 | CARGO_TERM_COLOR: always |
| 11 | |
| 12 | jobs: |
| 13 | rust: |
| 14 | name: Rust |
| 15 | runs-on: ubuntu-latest |
| 16 | |
| 17 | steps: |
| 18 | - name: Checkout |
| 19 | uses: actions/checkout@v4 |
| 20 | |
| 21 | - name: Install Rust |
| 22 | uses: dtolnay/rust-toolchain@stable |
| 23 | with: |
| 24 | components: clippy, rustfmt |
| 25 | |
| 26 | - name: Check formatting |
| 27 | run: cargo fmt --all -- --check |
| 28 | |
| 29 | - name: Run clippy |
| 30 | run: cargo clippy --all-targets --all-features -- -D warnings |
| 31 | |
| 32 | - name: Run tests |
| 33 | run: cargo test --all-targets --all-features |
| 34 |