CI / build + unit + e2e (pull_request) Successful in 2m5s
- Add .gitea/workflows/ci.yml: typecheck -> lint -> unit -> build -> deterministic Playwright e2e against the dev webServer (LLM_STUB=1). No dind/docker/static IP. - package-lock.json is committed (reproducible `npm ci`); verified npm install is a no-op. - Add CHANGELOG.md, set version 0.1.0, add .env (gitignored) + .env.example placeholder. - Document the mandatory feature-branch -> PR -> CI -> auto-merge workflow in AGENTS.md + README.md (e2e now runs in CI on every PR). - Add Playwright html/json reporters (playwright-report/, test-results/e2e.json) for the CI E2E-results summary step and the failure artifact upload.
41 lines
1.2 KiB
TypeScript
41 lines
1.2 KiB
TypeScript
import { defineConfig } from '@playwright/test';
|
|
|
|
// Deterministic e2e: the dev webServer runs with LLM_STUB=1 so the Express backend
|
|
// uses the canned, deterministic turn simulator (no live LLM in e2e — see
|
|
// server/stub.ts). Dev ports default to the spec values but can be overridden via
|
|
// VITE_PORT / HISTORY_API_PORT so the run can dodge a port another project holds.
|
|
const vitePort = Number(process.env.VITE_PORT ?? 5173);
|
|
const apiPort = Number(process.env.HISTORY_API_PORT ?? 4321);
|
|
const devUrl = `http://localhost:${vitePort}`;
|
|
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
fullyParallel: false,
|
|
workers: 1,
|
|
timeout: 60000,
|
|
expect: { timeout: 10000 },
|
|
use: {
|
|
baseURL: devUrl,
|
|
headless: true,
|
|
},
|
|
// Reporters: list → console; html → playwright-report/ (uploaded by CI on failure);
|
|
// json → test-results/e2e.json (parsed by CI's "E2E results summary" step).
|
|
reporter: [
|
|
['list'],
|
|
['html'],
|
|
['json', { outputFile: 'test-results/e2e.json' }],
|
|
],
|
|
webServer: {
|
|
command: 'npm run dev',
|
|
url: devUrl,
|
|
reuseExistingServer: true,
|
|
timeout: 120000,
|
|
env: {
|
|
LLM_STUB: '1',
|
|
DATA_DIR: 'data/e2e',
|
|
VITE_PORT: String(vitePort),
|
|
HISTORY_API_PORT: String(apiPort),
|
|
},
|
|
},
|
|
});
|