skillbox/local-setup-for-cypress-tes...

34 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
#!/bin/bash
export SECRET_KEY=abcd1234
export DATABASE_HOST=localhost
export DATABASE_USER=postgres
export PGPASSWORD=postgres
export DATABASE_NAME=skillbox_test_cypress
export DATABASE_PORT=5432
export DATABASE_URL=postgres://$DATABASE_USER:$PGPASSWORD@$DATABASE_HOST:$DATABASE_PORT/$DATABASE_NAME
export DEBUG=True
export USE_AWS=False
export SERVE_VIA_WEBPACK=False
export OAUTH_CLIENT_ID=1111111-222222-333-3444444
export OAUTH_CLIENT_SECRET=Abcd1234!
export OAUTH_ACCESS_TOKEN_URL=https://hepverlag-cms.grape.novu.ch/oauth/token
export OAUTH_AUTHORIZE_URL=https://hepverlag-cms.grape.novu.ch/oauth/authorize
export OAUTH_API_BASE_URL=https://hepverlag-cms.grape.novu.ch/
export OAUTH_LOCAL_REDIRECT_URI=http://localhost:8000/api/oauth/callback/
export NODE_OPTIONS=--max_old_space_size=3072
export DATABASE_HOST=localhost
export DATABASE_PORT=5432
export DATABASE_URL=postgres://$DATABASE_USER:$PG_PASSWORD@$DATABASE_HOST:$DATABASE_PORT/$DATABASE_NAME
psql -U $DATABASE_USER -h $DATABASE_HOST -c "drop database $DATABASE_NAME"
#npm install --prefix client
#npm run "install:cypress" --prefix client
psql -U $DATABASE_USER -h $DATABASE_HOST -c "create database $DATABASE_NAME"
python server/manage.py dummy_data
python server/manage.py runserver &
npm run dev --prefix client &
cd client
/node_modules/.bin/cypress run