1- # VisualCI's CI: lint, test (the root workspace 's crates; app/ with Postgres and RustFS; the Ruby client; the frontend
1+ # VisualCI's CI: lint, test (the CLI 's crates; app/ with Postgres and RustFS; the Ruby client; the frontend
22# build), then on main build and push the app and renderer images and deploy them by committing their digests to
33# talira-ai/infra (k3s/resources/visualci/kustomization.yaml), which ArgoCD applies. That commit is the deploy;
44# reverting it is the rollback.
4848 # snapshot-diff goes on crates.io: it builds without its schemars feature too.
4949 - run : cargo clippy --locked -p snapshot-diff --no-default-features --all-targets -- -D warnings
5050
51- # The app (app/, Laravel Rust): its own workspace. Its tests also render every customer email as HTML and text for
52- # the visual job.
51+ # The app (app/, Laravel Rust, the root workspace's visualci-app) . Its tests also render every customer email as HTML
52+ # and text for the visual job. fmt and clippy cover it in the lint job.
5353 app :
5454 runs-on : ${{ fromJSON(vars.CI_RUNNER || '"ubuntu-latest"') }}
5555 environment : ${{ github.ref == 'refs/heads/main' && 'kache-write' || '' }}
6363 POSTGRES_DB : visualci_app_test
6464 ports : ["55433:5432"]
6565 options : --health-cmd pg_isready --health-interval 5s --health-timeout 5s --health-retries 10
66- defaults :
67- run :
68- working-directory : app
6966 steps :
7067 - uses : actions/checkout@v4
7168 # S3 storage for the blob tests: RustFS, as the visual job uses.
7774 # it for dependency misses. Its key covers Cargo.lock and the toolchain; only main saves it, like kache.
7875 - uses : Swatinem/rust-cache@v2
7976 with :
80- workspaces : app
8177 save-if : ${{ github.ref == 'refs/heads/main' }}
8278 # Compile cache (kache, as Cargo's rustc wrapper): the R2 bucket every machine shares (KACHE_BUCKET), else the
8379 # GitHub Actions cache. Only main writes it: the read-write key is a secret of the kache-write environment,
9591 s3-access-key-id : ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_ACCESS_KEY_ID || secrets.KACHE_RO_ACCESS_KEY_ID }}
9692 s3-secret-access-key : ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_SECRET_ACCESS_KEY || secrets.KACHE_RO_SECRET_ACCESS_KEY }}
9793 - run : rustup show active-toolchain || rustup toolchain install
98- - run : cargo fmt --check
99- - run : cargo clippy --locked --all-targets -- -D warnings
100- - run : cargo test --locked
94+ - run : cargo test --locked -p visualci-app
10195 env :
10296 VISUALCI_EMAIL_SNAPSHOTS : ${{ github.workspace }}/tmp/email-snapshots
10397 - uses : actions/upload-artifact@v4
@@ -128,7 +122,8 @@ jobs:
128122 - run : python3 -c 'import yaml' 2>/dev/null || pip install pyyaml
129123 - run : python3 scripts/ci/check_orb.py
130124
131- # The root workspace's crates (crates/*: the CLI, core, renderer, snapshot-diff, wasm).
125+ # The CLI and its crates (crates/*: the CLI, core, renderer, snapshot-diff, wasm), built apart from the app so its
126+ # dependencies' features (such as serde_json's preserve_order) don't reach the CLI's tests.
132127 test :
133128 runs-on : ${{ fromJSON(vars.CI_RUNNER || '"ubuntu-latest"') }}
134129 environment : ${{ github.ref == 'refs/heads/main' && 'kache-write' || '' }}
@@ -150,7 +145,7 @@ jobs:
150145 s3-prefix : visualci
151146 s3-access-key-id : ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_ACCESS_KEY_ID || secrets.KACHE_RO_ACCESS_KEY_ID }}
152147 s3-secret-access-key : ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_SECRET_ACCESS_KEY || secrets.KACHE_RO_SECRET_ACCESS_KEY }}
153- - run : cargo test --locked --workspace
148+ - run : cargo test --locked --workspace --exclude visualci-app
154149
155150 # VisualCI tests itself: screenshots of the landing page, docs and app (against seeded data), Vitest component
156151 # snapshots, app/'s JSON golden files and the emails from `app`, sent as one build to the docspring/visualci project. A changed
@@ -196,21 +191,20 @@ jobs:
196191 s3-prefix : visualci
197192 s3-access-key-id : ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_ACCESS_KEY_ID || secrets.KACHE_RO_ACCESS_KEY_ID }}
198193 s3-secret-access-key : ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_SECRET_ACCESS_KEY || secrets.KACHE_RO_SECRET_ACCESS_KEY }}
199- # The CLI (root workspace) and the app the screenshots are taken against (app/, its own workspace ).
194+ # The CLI and the app the screenshots are taken against, each built on its own (so the CLI is the one users get ).
200195 - run : cargo build --locked -p visualci-cli
201- - run : cargo build --locked --bin visualci-app
202- working-directory : app
196+ - run : cargo build --locked -p visualci-app --bin visualci-app
203197 - uses : pnpm/action-setup@v4
204198 with :
205- package_json_file : server/ frontend/package.json
199+ package_json_file : frontend/package.json
206200 - uses : actions/setup-node@v4
207201 with :
208202 node-version : " 24"
209203 # skills/ is generated from the docs pages: fail when someone edited one without the other.
210204 - run : node scripts/skills.mjs --check
211- working-directory : server/ frontend
205+ working-directory : frontend
212206 - run : pnpm install --frozen-lockfile && pnpm build
213- working-directory : server/ frontend
207+ working-directory : frontend
214208 - run : pnpm install --frozen-lockfile && pnpm exec playwright install --with-deps chromium
215209 working-directory : scripts/screenshots
216210 - run : scripts/ci/visual.sh capture
@@ -227,7 +221,7 @@ jobs:
227221 tmp/visual/screenshots --prefix screenshots/ --platform chrome-linux
228222 tmp/visual/site --prefix site/
229223 tmp/visual/site/docs/quick-start.md --prefix site/docs/ --format text
230- server/ frontend/src --from vitest --prefix components/
224+ frontend/src --from vitest --prefix components/
231225 app/tests/golden/api --prefix json/api/ --format json
232226 app/tests/golden/mcp --prefix json/mcp/ --format json
233227 tmp/email-snapshots --prefix emails/ --keep-extension
@@ -281,17 +275,16 @@ jobs:
281275 s3-access-key-id : ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_ACCESS_KEY_ID || secrets.KACHE_RO_ACCESS_KEY_ID }}
282276 s3-secret-access-key : ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_SECRET_ACCESS_KEY || secrets.KACHE_RO_SECRET_ACCESS_KEY }}
283277 - run : cargo build --locked -p visualci-cli
284- - run : cargo build --locked --bin visualci-app
285- working-directory : app
278+ - run : cargo build --locked -p visualci-app --bin visualci-app
286279 - uses : pnpm/action-setup@v4
287280 with :
288- package_json_file : server/ frontend/package.json
281+ package_json_file : frontend/package.json
289282 - uses : actions/setup-node@v4
290283 with :
291284 node-version : " 24"
292285 # The site and the app's page, built for the .test hosts (scripts/hosts.mjs reads VISUALCI_*_URL)
293286 - run : pnpm install --frozen-lockfile && pnpm build && node scripts/site.mjs
294- working-directory : server/ frontend
287+ working-directory : frontend
295288 env :
296289 GITHUB_TOKEN : ${{ github.token }}
297290 - run : pnpm install --frozen-lockfile && pnpm exec playwright install --with-deps chromium
@@ -328,7 +321,7 @@ jobs:
328321 working-directory : clients/ruby
329322 - uses : pnpm/action-setup@v4
330323 with :
331- package_json_file : server/ frontend/package.json
324+ package_json_file : frontend/package.json
332325 - uses : actions/setup-node@v4
333326 with :
334327 node-version : " 24"
@@ -351,23 +344,23 @@ jobs:
351344 s3-secret-access-key : ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_SECRET_ACCESS_KEY || secrets.KACHE_RO_SECRET_ACCESS_KEY }}
352345 # The production site: with the Plausible snippets (analytics.ts) and, required, the WebAssembly.
353346 - run : pnpm install --frozen-lockfile && VISUALCI_ANALYTICS=1 VISUALCI_REQUIRE_WASM=1 pnpm build
354- working-directory : server/ frontend
347+ working-directory : frontend
355348 # visualci.com's static site: assembled from the build and checked (every docs page has its Markdown copy, and
356349 # llms.txt links each one), then deployed by the site job.
357350 - run : VISUALCI_ANALYTICS=1 node scripts/site.mjs
358- working-directory : server/ frontend
351+ working-directory : frontend
359352 env :
360353 GITHUB_TOKEN : ${{ github.token }}
361354 VISUALCI_REQUIRE_WASM : " 1"
362355 - uses : actions/upload-artifact@v4
363356 with :
364357 name : dist-site
365- path : server/ frontend/dist-site
358+ path : frontend/dist-site
366359 # .well-known/agent-skills/ is hidden, and upload-artifact leaves hidden files out by default.
367360 include-hidden-files : true
368361 retention-days : 7
369362
370- # visualci.com is a Cloudflare Worker with static assets (server/ frontend/site/wrangler.jsonc), deployed on main
363+ # visualci.com is a Cloudflare Worker with static assets (frontend/site/wrangler.jsonc), deployed on main
371364 # before the app, so the apex never points at an app that no longer serves it. Needs the repo secret
372365 # CLOUDFLARE_API_TOKEN (Workers Scripts on the DocSpring Products account, Workers Routes on visualci.com) and the
373366 # repo variable CLOUDFLARE_ACCOUNT_ID; without them it warns and skips.
@@ -381,12 +374,12 @@ jobs:
381374 - uses : actions/download-artifact@v4
382375 with :
383376 name : dist-site
384- path : server/ frontend/dist-site
377+ path : frontend/dist-site
385378 - uses : actions/setup-node@v4
386379 with :
387380 node-version : " 24"
388381 - name : Deploy to Cloudflare
389- working-directory : server/ frontend/site
382+ working-directory : frontend/site
390383 env :
391384 CLOUDFLARE_API_TOKEN : ${{ secrets.CLOUDFLARE_API_TOKEN }}
392385 CLOUDFLARE_ACCOUNT_ID : ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
0 commit comments