diff --git a/hp/.husky/pre-push b/hp/.husky/pre-push index 7568d8d..4795982 100755 --- a/hp/.husky/pre-push +++ b/hp/.husky/pre-push @@ -4,3 +4,7 @@ cd hp || exit 1 node --run test >&2 + +node --run build:dist:skip-install + +GIT_PUSH_HOOK=true node --run e2e diff --git a/hp/playwright.config.mjs b/hp/playwright.config.mjs index b7a08fb..628d2b4 100644 --- a/hp/playwright.config.mjs +++ b/hp/playwright.config.mjs @@ -40,13 +40,15 @@ let config = { ], }; -if (process.env.CI) { +const shouldStartWebServer = process.env.CI || process.env.GIT_PUSH_HOOK; + +if (shouldStartWebServer) { config = { ...config, webServer: { command: 'node --run start', url: 'http://127.0.0.1:3000', - reuseExistingServer: !process.env.CI, + reuseExistingServer: !shouldStartWebServer, }, }; }