Add a Rust CI job (test + clippy + fmt + embed-web build) #25

Open
opened 2026-06-03 21:43:43 +00:00 by logaritmisk · 0 comments
Owner

Context

Until the frontend milestone, the repo had no CI workflow at all — the backend was verified only by local cargo test. The frontend M1 work added .gitea/workflows/ci.yaml with a web job (typecheck/lint/test/build/bundle-size), but there is still no Rust job. So the whole Rust workspace (domain/db/api/auth/search/server) is currently unguarded in CI.

What to do

Add a rust job to .gitea/workflows/ci.yaml (alongside web):

  • Services: PostgreSQL (the suite uses #[sqlx::test] provisioning temp DBs — needs a role that can CREATE DATABASE) and Meilisearch (the search crate tests + api's on-write reindex test require MEILI_URL/MEILI_MASTER_KEY).
  • Steps: cargo +nightly fmt --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace (with DATABASE_URL + MEILI_URL + MEILI_MASTER_KEY env).
  • Also verify the SPA-embed release path (frontend M1 acceptance criterion #3, currently only checked locally): build the SPA then cargo build -p server --features embed-web (and optionally cargo test -p server --features embed-web --test embed). This needs the web build output, so either chain it after the web job or build the SPA within the rust job.

Acceptance

  • A rust CI job runs fmt-check + clippy + workspace tests against Postgres + Meili services and is green.
  • The embed-web build path is exercised in CI so the embedded-SPA release artifact can't silently break.

Source: frontend SPA milestone 1 final review — pre-existing gap (no Rust CI).

## Context Until the frontend milestone, the repo had **no CI workflow at all** — the backend was verified only by local `cargo test`. The frontend M1 work added `.gitea/workflows/ci.yaml` with a **`web`** job (typecheck/lint/test/build/bundle-size), but there is still **no Rust job**. So the whole Rust workspace (domain/db/api/auth/search/server) is currently unguarded in CI. ## What to do Add a `rust` job to `.gitea/workflows/ci.yaml` (alongside `web`): - Services: PostgreSQL (the suite uses `#[sqlx::test]` provisioning temp DBs — needs a role that can `CREATE DATABASE`) and Meilisearch (the `search` crate tests + `api`'s on-write `reindex` test require `MEILI_URL`/`MEILI_MASTER_KEY`). - Steps: `cargo +nightly fmt --check`, `cargo clippy --workspace --all-targets -- -D warnings`, `cargo test --workspace` (with `DATABASE_URL` + `MEILI_URL` + `MEILI_MASTER_KEY` env). - **Also verify the SPA-embed release path** (frontend M1 acceptance criterion #3, currently only checked locally): build the SPA then `cargo build -p server --features embed-web` (and optionally `cargo test -p server --features embed-web --test embed`). This needs the `web` build output, so either chain it after the web job or build the SPA within the rust job. ## Acceptance - A `rust` CI job runs fmt-check + clippy + workspace tests against Postgres + Meili services and is green. - The `embed-web` build path is exercised in CI so the embedded-SPA release artifact can't silently break. _Source: frontend SPA milestone 1 final review — pre-existing gap (no Rust CI)._
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: logaritmisk/biggus-dickus#25