| `npm run test:e2e:ci` | Playwright only (backend must already be built) |
| `npm run test:e2e:install` | `playwright install chromium` (+ OS deps on Linux: `--with-deps`) |
| `npm run e2e:prepare` | `npm run build` in backend (`E2E_BACKEND_ROOT`) |
| `npm run ci:checkout-backend` | Clone backend for CI layout (see E2E contract) |
## CI (Gitea Actions)
Workflow: [`.gitea/workflows/ci.yml`](.gitea/workflows/ci.yml) (runs on **push** and **pull_request** when a Gitea **act_runner** is registered — **not verified** on `get.feep.ir` from this repo alone).
### Jobs (this repository)
| Job | Steps (same as local) |
|-----|------------------------|
| **unit** | `npm ci` → `npm run test` → `npm run type-check` → `npm run build` |
| Temp DB | SQLite under OS temp (`scripts/e2e-backend.mjs`) — never `data/app.db` |
**Pin backend version in CI (required for e2e job):** set repository variable `E2E_BACKEND_REF` to a **commit SHA** (or immutable tag). There is **no** silent fallback to `main`.
**Local sibling layout (no clone):**
```powershell
$env:E2E_BACKEND_ROOT="E:\path\to\backend-nest"# optional; default is ../backend-nest
npmruntest:e2e
```
**Local fallback when Playwright Chromium CDN fails:**`$env:PLAYWRIGHT_CHROME_CHANNEL = "chrome"` (system Chrome). **CI must not rely on this** — use `npx playwright install chromium --with-deps`.
### Secrets (names only — never commit values)
| Name | Purpose |
|------|---------|
| `E2E_BACKEND_CHECKOUT_TOKEN` | Read access to private `gold_land_server` for `git clone` in E2E job |
If the backend repo is public, clone may work without a token. If clone fails, the **e2e** job fails; **unit** still runs.
### Runner prerequisites (Linux, e.g. `ubuntu-latest` label)
- Node **22.18.0**
- Git
- Build toolchain for **better-sqlite3** (backend dependency): `build-essential`, `python3` (Playwright `--with-deps` installs browser OS libs; backend `npm ci` still needs native compile on Linux)
- Sufficient disk for `node_modules`× 2 + Chromium
### Not yet verified on a real runner
- Gitea Actions enabled and **act_runner** online for `gold_land/gold_land_user`
- E2E job with private backend clone + `E2E_BACKEND_CHECKOUT_TOKEN`
-`vars.E2E_BACKEND_REF` / `gitea.run_id` in workflow expressions (Gitea ≥ 1.21; `github.*` aliases may apply)