Repository navigation
<
8000
/div>
Conversation
… ship in the .crate `cargo package --workspace` did not produce publishable crates. The workspace manifest had no `documentation` and no `readme`; LICENSE sat at the repository root, which `cargo package` never reads; the sqlx offline data sat at the root too, so the packaged store crate could not compile without a database; and the web UI was built to `web/build`, outside the server crate, so the published server would have served the placeholder. - `[workspace.package]`: add `documentation`, `readme`, and the author email. Each crate points `documentation` at its docs.rs page. - Copy LICENSE into every crate; cargo only packages files under the crate root. - Move `.sqlx/` into `crates/evalhub-store/`, where the macros find it and `cargo package` ships it. `cargo sqlx prepare` now runs from that crate. - Build the SvelteKit UI into `crates/evalhub-server/web-dist`, gitignored there and put in the .crate through the crate's `include` list, the Kellnr / SQLPage shape. A new `build.rs` refuses a release build without it, as Tauri does for `frontendDist`, with `DOCS_RS` and `EVALHUB_ALLOW_MISSING_UI` as the explicit exceptions; debug builds keep `allow_missing` and the placeholder. - Add a `justfile`: `web-build`, `check`, `sqlx-check`, `package`, and `package-gate`, which opens every .crate and fails unless LICENSE, README, the UI and the offline data are inside and the size is under the crates.io limit. Publishing stays a hand-typed command. - README, web/README, CONTRIBUTING and AGENTS follow the new locations. Verified: `cargo package --workspace` verifies all five crates; the gate passes with the UI and fails without it; `cargo check --release` fails without `web-dist` and passes with the opt-out; `cargo test -p evalhub-server` is green with the UI embedded; `cargo sqlx prepare --check` passes from the store crate against a migrated Postgres; the installed release binary serves the embedded index.html, immutable assets and deep links from outside the source tree. Signed-off-by: Yutaka Nishimura <ytk.nishimura@gmail.com>
…ight suite The integration tests drive an in-process router; nothing exercised the binary a user runs. `e2e/smoke.sh` now starts a throwaway Postgres, runs `evalhub migrate`, serves the release build from outside the source tree (so the UI has to be inside the binary), and asks it for what a browser would: the embedded index.html, an immutable asset with its year-long cache header, a deep link, the API and its 404 boundary. It then runs the Playwright suite in `web/tests/browser` against the same server: the bundle boots, the masthead settles once `whoami` answers, a deep link renders as its page, and a client-side navigation paints a list the API filled. `just e2e` builds the UI and the release binary and runs both halves. `just e2e-install` fetches the Chromium headless shell into the user's cache without root and checks with `ldd` that the host has the libraries it links against, naming the fix when it does not. `playwright.config.ts` has no `webServer` on purpose: the harness is the shell script, and the suite takes the hub's URL from `EVALHUB_E2E_BASE_URL`. Verified on the shared dev host: 16 checks pass (curl and browser), no containers left behind; svelte-check and prettier are clean. Signed-off-by: Yutaka Nishimura <ytk.nishimura@gmail.com>
…package` Four jobs on every push to main and every pull request. `rust` runs fmt, clippy, cargo-deny, the tests crate by crate (never `--workspace`), and the sqlx offline check against a Postgres service. `web` runs svelte-check and prettier. `e2e` installs the Chromium headless shell with its system libraries (the runner has root) and runs `just e2e`, keeping the Playwright report as an artifact on failure. `package` runs `just package`, so a crate that would not verify or ship without its LICENSE, README, offline data or UI fails before anyone publishes it. `web/package.json` now names `pnpm@12.5.1` in `packageManager`, so corepack resolves the same pnpm on every machine; pnpm records that pin in the lockfile. Verified locally: the workflow parses; `cargo metadata --locked` is satisfied; the sqlx step (`sqlx migrate run --source ...` then `just sqlx-check`) passes against a throwaway Postgres; a frozen-lockfile install passes with the pin. The workflow itself has not run: nothing is pushed. Signed-off-by: Yutaka Nishimura <ytk.nishimura@gmail.com>
With DATABASE_URL set for the whole job, the sqlx macros went online and checked every query against the Postgres service before it had been migrated, so clippy failed on evalhub-store with 73 "relation does not exist" errors. Only the offline-data check needs the database; clippy and the tests use the committed .sqlx data. Signed-off-by: Yutaka Nishimura <ytk.nishimura@gmail.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three commits that make the workspace publishable and put a CI in front of it.
Packaging (
2f8b833)cargo package --workspacedid not produce publishable crates:documentationandreadme, andauthorshad no email;cargo packagenever reads;web/build, outside the server crate, so the published server would have served the placeholder page.Now every crate carries LICENSE and README;
.sqlx/lives incrates/evalhub-store/; the SvelteKit build lands incrates/evalhub-server/web-dist, gitignored there and shipped through the crate'sincludelist (the Kellnr / SQLPage shape). Abuild.rsrefuses a release build without the UI, as Tauri does forfrontendDist, withDOCS_RSandEVALHUB_ALLOW_MISSING_UIas the explicit opt-outs; debug builds keep the placeholder. Ajustfileaddsweb-build,check,sqlx-check,packageandpackage-gate, which opens every.crateand fails unless LICENSE, README, the UI and the offline data are inside and the size is under the crates.io limit. Publishing stays a hand-typed command.End to end (
75526c1)just e2eboots the release binary against a throwaway Postgres from outside the source tree, fetches the embedded UI, an immutable asset, a deep link and the API, then runs a Playwright suite (web/tests/browser) against the same server.just e2e-installfetches the Chromium headless shell without root and checks the host has its shared libraries.CI (
76ade6d).github/workflows/ci.yml:rust(fmt, clippy, cargo-deny, per-crate tests, sqlx check),web(svelte-check, prettier),e2e(just e2e),package(just package).web/package.jsonpinspnpm@12.5.1throughpackageManager.Verified locally
cargo package --workspaceverifies all five crates and the gate passes with the UI and fails without it;cargo check --releasefails withoutweb-distand passes with the opt-out;cargo test -p evalhub-serveris green with the UI embedded;cargo sqlx prepare --checkpasses from the store crate;just e2epasses 16 checks; the installed release binary serves the embedded UI. The workflow has not run yet: this PR is its first run.