0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 09:16:49 +01:00
posthog/bin/e2e-test-runner

16 lines
648 B
Bash
Executable File

#!/bin/bash
set -e
dropdb --if-exists posthog_e2e_test
createdb posthog_e2e_test
DEBUG=1 DATABASE_URL=postgres://localhost:5432/posthog_e2e_test python manage.py migrate &&
DEBUG=1 DATABASE_URL=postgres://localhost:5432/posthog_e2e_test python manage.py setup_dev &
yarn add cypress-terminal-report
# Only start webpack if not already running
nc -vz 127.0.0.1 8234 2> /dev/null || ./bin/start-frontend &
CYPRESS_BASE_URL=http://localhost:8080 npx cypress open --config-file cypress.e2e.json &
DEBUG=1 TEST=1 AUTO_LOGIN=1 DATABASE_URL=postgres://localhost:5432/posthog_e2e_test python manage.py runserver 8080
yarn remove cypress-terminal-report