| 1 | name: CI |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: [main, trunk] |
| 6 | pull_request: |
| 7 | branches: [main] |
| 8 | |
| 9 | env: |
| 10 | CARGO_TERM_COLOR: always |
| 11 | |
| 12 | jobs: |
| 13 | build: |
| 14 | runs-on: macos-latest |
| 15 | steps: |
| 16 | - uses: actions/checkout@v5 |
| 17 | with: |
| 18 | submodules: true |
| 19 | |
| 20 | - name: Install Rust |
| 21 | uses: dtolnay/rust-toolchain@stable |
| 22 | |
| 23 | - name: Cache cargo |
| 24 | uses: actions/cache@v5 |
| 25 | with: |
| 26 | path: | |
| 27 | ~/.cargo/bin/ |
| 28 | ~/.cargo/registry/index/ |
| 29 | ~/.cargo/registry/cache/ |
| 30 | ~/.cargo/git/db/ |
| 31 | target/ |
| 32 | key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} |
| 33 | |
| 34 | - name: Build |
| 35 | run: cargo build --workspace |
| 36 | |
| 37 | - name: Test |
| 38 | run: cargo test --workspace |
| 39 | |
| 40 | - name: Clippy |
| 41 | run: cargo clippy -p tarmac -p tarmacctl -- -D warnings -A clippy::wrong_self_convention -A clippy::too_many_arguments |
| 42 | |
| 43 | - name: Format check |
| 44 | run: cargo fmt -p tarmac -p tarmacctl -- --check |
| 45 |