ci: expand CI checks and make consumer sync opt-in
- Add Go, npm, Python, and Java validation to CI - Run Go tests against PostgreSQL - Record performance fixes in the report
This commit is contained in:
1 parent
199a5efaef
commit
22887fef03
100 files changed
+9740
-429
No files matched your search
@@ -106,7 +106,7 @@ To pull the latest snapshot into every registered consumer:
|
||||
.\scripts\sync-consumers.ps1 -Commit -Push
|
||||
```
|
||||
|
||||
The script copies every tracked file in this repo into each consumer's `shared/` folder, regenerates any `package-lock.json` that depends on a local `file:` package, and commits/pushes only if something actually changed ("Sync shared snapshot from `<short-sha>`"). Consumers are registered in the script's `$consumerProjects` list. A `post-commit` hook (installed via `scripts/install-sync-hook.ps1`) runs this automatically — with `-Commit` only, never `-Push` — after every commit to this repo, so pushing the sync commits it creates to each consumer is still a manual follow-up step.
|
||||
The script copies every tracked file in this repo into each consumer's `shared/` folder, regenerates any `package-lock.json` that depends on a local `file:` package, and commits/pushes only if something actually changed ("Sync shared snapshot from `<short-sha>`"). Consumers are registered in the script's `$consumerProjects` list. A `post-commit` hook (installed via `scripts/install-sync-hook.ps1`) can run this automatically, with `-Commit` only and never `-Push`. It is opt-in: it does nothing unless the commit is made with `SHARED_SYNC_COMMIT=1` in the environment, so an ordinary commit here never writes to a consumer repository. Pushing the sync commits to each consumer remains a manual follow-up step. Running with `-Force` over a consumer that has local changes first copies the replaced `shared/` folder to a temporary backup directory, and the script prints its path.
|
||||
|
||||
### Published registry packages (for standalone/external use)
|
||||
|
||||
@@ -119,8 +119,11 @@ The npm, Go, and Python packages are also published to this Gitea instance's pac
|
||||
```bash
|
||||
npm install
|
||||
npm run check
|
||||
npm run lint # svelte-check, Node syntax check and ESLint
|
||||
npm run format:check # Prettier, for the files written to its style (.prettierrc.json)
|
||||
npm run build # builds packages/web-ui/dist (gitignored, not committed)
|
||||
npm run test:node-backend
|
||||
npm run test:web-ui # Vitest component and store tests (jsdom)
|
||||
```
|
||||
|
||||
```bash
|
||||
@@ -129,6 +132,10 @@ go test ./...
|
||||
go vet ./...
|
||||
```
|
||||
|
||||
Go tests that need PostgreSQL skip themselves unless a scratch database is named: `DATABASE_URL` for the auth store tests, `SHARED_TEST_DATABASE_URL` for the platform-user, mediacore and migrate tests. They create tables and delete rows, so never point either at a real database. CI runs them against a throwaway PostgreSQL service (`go test -p 1 ./...`).
|
||||
|
||||
`contract/auth-contract.json` holds fixtures (password hashes, TOTP codes, client addresses) that the Go, Node and Python test suites all load, so the runtimes cannot drift apart unnoticed.
|
||||
|
||||
---
|
||||
|
||||
## Typical `web-ui` wiring
|
||||
@@ -196,4 +203,4 @@ The Go module lives under `backend`, so its release tag uses the submodule prefi
|
||||
|
||||
## CI/CD
|
||||
|
||||
`lint.yml` and `tests.yml` each run three jobs — Node/Svelte, Go, and Python. `publish-npm.yml`, `publish-go.yml`, and `publish-python.yml` handle registry publishing as described above.
|
||||
`lint.yml` runs three jobs — Node/Svelte (svelte-check, ESLint, Prettier), Go, and Python; `tests.yml` runs four — Node/Svelte (including the web-ui Vitest suite), Go (against a PostgreSQL service), Python, and Java. `publish-npm.yml`, `publish-go.yml`, and `publish-python.yml` handle registry publishing as described above.
|
||||
Reference in new issue
Block a user