Skip to content

Commit 5a80b28

Browse files
committed
fix: cypress run from before-push
1 parent 9636766 commit 5a80b28

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

before-push.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ echo "Sleeping 10 seconds for the application to start"
88
sleep 10
99
echo "Woke up, after 10 seconds, running tests now..."
1010
docker compose run --rm -e CI=true json-tool npm run test
11-
docker run --network=host --rm -e CYPRESS_BASE_URL=http://localhost:3000 -v $(pwd):/app -w /app cypress/included:15.10.0 npm run e2e
11+
docker run --network=host --rm -e CYPRESS_BASE_URL=http://localhost:3000 -e ELECTRON_EXTRA_LAUNCH_ARGS=--remote-debugging-port=9222 -v $(pwd):/app -w /app cypress/included:15.10.0 npm run e2e
1212
docker compose down --remove-orphans
1313
docker compose run --rm json-tool rm -rf node_modules/ coverage/ build/ .nyc_output

cypress.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ module.exports = defineConfig({
1616
],
1717
'experimentalRunAllSpecs': true,
1818
setupNodeEvents(on, config) {
19+
coverage(on, config);
20+
on('file:preprocessor', cucumber());
21+
1922
if (process.env.ELECTRON_EXTRA_LAUNCH_ARGS) {
2023
on('task', {
2124
prepareArchives: () => {
@@ -28,8 +31,6 @@ module.exports = defineConfig({
2831
if (process.env.CI) {
2932
installPlugin(on, config);
3033
}
31-
coverage(on, config);
32-
on('file:preprocessor', cucumber());
3334
return config;
3435
}
3536
}

0 commit comments

Comments
 (0)