mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-30 05:34:15 +02:00
Always start an isolated ephemeral Gitea instance with its own temp directory, SQLite database, and config file. This addresses review feedback that using the developer's existing instance is unreliable. - Rewrite test-e2e.sh to create a temp workdir, find a free port, write a minimal app.ini, start the server, and clean up on exit - Build a separate gitea-e2e binary using TEST_TAGS (includes sqlite) - Simplify CI workflow: remove manual app.ini, server start, and redundant build steps - Rename all env vars to use GITEA_TEST_E2E_* prefix - Rename test user from "e2e" to "e2e-user" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
30 lines
712 B
TypeScript
30 lines
712 B
TypeScript
import {env} from 'node:process';
|
|
import {defineConfig, devices} from '@playwright/test';
|
|
|
|
export default defineConfig({
|
|
testDir: './tests/e2e/',
|
|
outputDir: './tests/e2e-output/',
|
|
testMatch: /.*\.test\.ts/,
|
|
forbidOnly: Boolean(env.CI),
|
|
reporter: 'list',
|
|
timeout: env.CI ? 12000 : 6000,
|
|
expect: {
|
|
timeout: env.CI ? 6000 : 3000,
|
|
},
|
|
use: {
|
|
baseURL: env.GITEA_TEST_E2E_URL?.replace?.(/\/$/g, ''),
|
|
locale: 'en-US',
|
|
actionTimeout: env.CI ? 6000 : 3000,
|
|
navigationTimeout: env.CI ? 12000 : 6000,
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: {
|
|
...devices['Desktop Chrome'],
|
|
permissions: ['clipboard-read', 'clipboard-write'],
|
|
},
|
|
},
|
|
],
|
|
});
|