fix: Enhance Dockerfile and scripts for improved dependency management and coverage reporting

This commit is contained in:
GitHub Actions
2026-02-18 14:31:14 +00:00
parent 0369eb1c12
commit 849d95ca84
15 changed files with 1285 additions and 126 deletions

View File

@@ -35,6 +35,10 @@ if (!process.env.PLAYWRIGHT_BASE_URL) {
// to restore the legacy dependency behavior when needed.
const skipSecurityDeps = process.env.PLAYWRIGHT_SKIP_SECURITY_DEPS !== '0';
const browserDependencies = skipSecurityDeps ? ['setup'] : ['setup', 'security-tests'];
const crossBrowserCaddyImportSpec =
/security-enforcement\/zzz-caddy-imports\/caddy-import-cross-browser\.spec\.(ts|js)$/;
const securityEnforcementExceptCrossBrowser =
/security-enforcement\/(?!zzz-caddy-imports\/caddy-import-cross-browser\.spec\.(ts|js)$).*/;
const coverageReporterConfig = enableCoverage ? defineCoverageReporterConfig({
sourceRoot: __dirname,
@@ -262,7 +266,8 @@ export default defineConfig({
storageState: STORAGE_STATE,
},
dependencies: browserDependencies,
testIgnore: ['**/frontend/**', '**/node_modules/**', '**/backend/**', '**/security-enforcement/**', '**/security/**'],
testMatch: [crossBrowserCaddyImportSpec, /.*\.spec\.(ts|js)$/],
testIgnore: ['**/frontend/**', '**/node_modules/**', '**/backend/**', securityEnforcementExceptCrossBrowser, '**/security/**'],
},
{
@@ -272,7 +277,8 @@ export default defineConfig({
storageState: STORAGE_STATE,
},
dependencies: browserDependencies,
testIgnore: ['**/frontend/**', '**/node_modules/**', '**/backend/**', '**/security-enforcement/**', '**/security/**'],
testMatch: [crossBrowserCaddyImportSpec, /.*\.spec\.(ts|js)$/],
testIgnore: ['**/frontend/**', '**/node_modules/**', '**/backend/**', securityEnforcementExceptCrossBrowser, '**/security/**'],
},
{
@@ -282,7 +288,8 @@ export default defineConfig({
storageState: STORAGE_STATE,
},
dependencies: browserDependencies,
testIgnore: ['**/frontend/**', '**/node_modules/**', '**/backend/**', '**/security-enforcement/**', '**/security/**'],
testMatch: [crossBrowserCaddyImportSpec, /.*\.spec\.(ts|js)$/],
testIgnore: ['**/frontend/**', '**/node_modules/**', '**/backend/**', securityEnforcementExceptCrossBrowser, '**/security/**'],
},
/* Test against mobile viewports. */