fix: CI must run codegen before building appview The generated code (Row types, CRUD, compiled morphisms) is gitignored and must be regenerated in CI before cargo build/test/clippy. Also copy lexicons and compiled morphisms into Docker runtime image.
Author: Aaron Steven White
Commit
62e8664c2f4517bb3b5ba01c2d62cd04cce25ae4Parent: 2fa39d9c70
Structural diff unavailable
These commits were pushed via plain git push, so no pre-parsed
schemas are available. Install git-remote-cospan and re-push via panproto:// to
see scope-level changes, breaking change detection, and semantic diffs.
brew install panproto/tap/git-remote-cospan2 files changed +12 -1
@@ -21,6 +21,7 @@ jobs:
2121 with: 2222 components: clippy, rustfmt 2323 - uses: Swatinem/rust-cache@v2 24+ - run: cargo run -p cospan-codegen 2425 - run: cargo fmt --all -- --check 2526 - run: cargo clippy --workspace -- -D warnings 2627
@@ -47,6 +48,7 @@ jobs:
4748 - uses: actions/checkout@v4 4849 - uses: dtolnay/rust-toolchain@stable 4950 - uses: Swatinem/rust-cache@v2 51+ - run: cargo run -p cospan-codegen 5052 - run: cargo test --workspace 5153 5254 build:
@@ -56,6 +58,7 @@ jobs:
5658 - uses: actions/checkout@v4 5759 - uses: dtolnay/rust-toolchain@stable 5860 - uses: Swatinem/rust-cache@v2 61+ - run: cargo run -p cospan-codegen 5962 - run: cargo build --workspace --release 6063 6164 codegen:
@@ -70,9 +73,12 @@ jobs:
7073 - run: test -f generated/rust/types.rs 7174 - run: test -f generated/rust/row_types.rs 7275 - run: test -f generated/rust/crud.rs 73- - run: test -f generated/rust/from_json.rs 76+ - run: test -f generated/rust/xrpc_types.rs 7477 - run: test -f generated/typescript/types.ts 7578 - run: test -f generated/sql/baseline.json 79+ - run: test -d generated/sql/migrations 80+ - run: test -f generated/interop/compiled_morphisms.msgpack 81+ - run: test -f generated/interop/db_projections.msgpack 7682 7783 schema-check: 7884 name: Schema Breaking Change Detection
@@ -10,6 +10,9 @@ COPY Cargo.toml Cargo.lock ./
1010 COPY crates/ crates/ 1111 COPY packages/ packages/ 1212 13+# Run codegen first (generates Row types, CRUD, compiled morphisms) 14+RUN cargo run -p cospan-codegen 15+ 1316 # Build the cospan-appview binary 1417 RUN cargo build --release -p cospan-appview 1518
@@ -20,6 +23,8 @@ RUN apt-get update && apt-get install -y ca-certificates libssl3 curl && rm -rf
2023 2124 COPY --from=builder /app/target/release/cospan-appview /usr/local/bin/ 2225 COPY --from=builder /app/crates/cospan-appview/migrations /app/migrations 26+COPY --from=builder /app/packages/lexicons /app/packages/lexicons 27+COPY --from=builder /app/generated/interop /app/generated/interop 2328 2429 WORKDIR /app 2530