Merge pull request #3 from Travis-Gilbert/Travis-Gilbert/morphologica… #18
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: CI | |
| # Build, lint, and test gate for the whole workspace on a clean runner. | |
| # The Dockerfile proves the rustyred-server binary builds; this proves every | |
| # crate compiles, lints stay clean under -D warnings, formatting is enforced, | |
| # and the test suite passes. protobuf-compiler is required because | |
| # crates/rustyred-server/build.rs compiles vendor/proto via tonic-build. | |
| # The vendored proto is in-tree, so no submodule checkout is needed. | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build-test: | |
| name: fmt + clippy + test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repo | |
| uses: actions/checkout@v4 | |
| - name: Install protobuf-compiler | |
| run: sudo apt-get update && sudo apt-get install -y --no-install-recommends protobuf-compiler | |
| - name: Install Rust toolchain (stable + rustfmt + clippy) | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache cargo registry and build artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Format check | |
| run: cargo fmt --all -- --check | |
| - name: Clippy (deny warnings) | |
| run: cargo clippy --workspace --all-targets --locked -- -D warnings | |
| - name: Test | |
| run: cargo test --workspace --locked |