Open History to see the last commit
1# PR CI
2
3The PR workflow runs eight test jobs independently. Each job builds its selected
4packages and their workspace dependencies before running tests. Builds retain
5pnpm's dependency order; package tests run without that ordering, with at most
6two package processes and two Vitest workers per process.
7
8| Group | Scope |
9| --- | --- |
10| `db-1`, `db-2` | Two Vitest file shards of DB, excluding the replay process suite |
11| `db-replay` | The complete `oracle-replay.test.ts` suite |
12| `ivm-offline` | IVM and offline transactions; explicit test-source typechecks and dependency version checks |
13| `sqlite-core` | SQLite persistence core |
14| `sqlite-adapters` | Browser, Node, Electron, Cloudflare, React Native, Expo, Capacitor, and Tauri persistence |
15| `frameworks` | React, React Router, Solid, Vue, Svelte, and Angular |
16| `collections` | Electric, Query, PowerSync, RxDB, TrailBase, and the shared E2E suite container |
17
18`scripts/ci-tests.mjs` owns the package assignments. It rejects an unassigned or
19multiply assigned package test script. When adding a package with tests, assign
20it to a group and keep the workflow matrix in sync if adding a new group.
21
22Run a group locally after installing the locked dependencies:
23
24```sh
25node scripts/ci-tests.mjs check
26node scripts/ci-tests.mjs build db-1
27node scripts/ci-tests.mjs test db-1
28```
29
30The DB jobs retain coverage and typechecking. They write distinct Vitest blob
31reports, which the final `Test` job merges into the full DB coverage and test
32report. That job first requires both test matrices to succeed. Failure,
33cancellation, or a skipped matrix cannot produce a successful aggregate check.
34Other packages retain their existing coverage and typecheck configurations.
35Oracle campaigns and their run budgets are unchanged.
36
37The E2E workflow has three groups: browser/SSR/Query (including the optional
38Electric suites), Node/Electron persistence, and Cloudflare/mobile persistence.
39Each builds its dependencies once. Individual suites retain their serial
40execution where a shared database requires it. The final `Run E2E Tests` check
41requires all groups to succeed. Superseded runs are cancelled per PR. Existing
42Electric and mobile-runtime enablement conditions still apply.
43
44Preview publication and compressed-size comparison run independently. The size
45job compares DB and React DB in one pass, building the required dependencies
46at both the PR head and base. Its commands must exist on the base revision too;
47a build script introduced only by a PR cannot be used for this comparison.
48
49The target is completion within five minutes, including setup, builds, and
50report aggregation. Measure job execution and queue delay separately, and track
51both workflow creation-to-completion time and total runner minutes. Before this
52split, 30 successful PR runs from October 2–5, 2026 had a Test median of 12:39
53and P95 of 13:25, excluding queueing. These baseline measurements do not prove
54the new workflow meets the target; use hosted runs to tune the slowest group.