-
-
Notifications
You must be signed in to change notification settings - Fork 775
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add updated cypress-run to red-squirrel
- Loading branch information
Kevin Solorio
committed
Sep 13, 2021
1 parent
feb041f
commit a8cae36
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#! /bin/bash | ||
set -eou pipefail | ||
|
||
# start ganache and send to background | ||
# using published ganache mnemonic - known globally and not a secret | ||
export SECRET_WORDS="chief loud snack trend chief net field husband vote message decide replace" | ||
node_modules/.bin/ganache-cli -m "${SECRET_WORDS}" -h 0.0.0.0 & | ||
|
||
# build assets | ||
mkdir -p app/assets/{static,media} | ||
export STATICFILES_DIRS="${TRAVIS_BUILD_DIR}/app/assets/" | ||
python3 app/manage.py bundle | ||
yarn run build | ||
|
||
python3 app/manage.py collectstatic --noinput --disable-collectfast | ||
|
||
# set up database | ||
python3 app/manage.py migrate | ||
python3 app/manage.py loaddata "${TRAVIS_BUILD_DIR}/app/app/fixtures/users.json" | ||
python3 app/manage.py loaddata "${TRAVIS_BUILD_DIR}/app/app/fixtures/profiles.json" | ||
|
||
# run app server | ||
python3 app/manage.py runserver 0.0.0.0:8000 & | ||
|
||
# set required env vars and run cypress tests | ||
export NETWORK_NAME=localhost | ||
export PASSWORD="g1tc01nc0" # used in readme for root user account | ||
export CYPRESS_REMOTE_DEBUGGING_PORT=9222 | ||
export VERBOSE=1 | ||
node_modules/.bin/cypress install | ||
node_modules/.bin/wait-on http://0.0.0.0:8000 | ||
node_modules/.bin/cypress run \ | ||
--browser chrome \ | ||
--headed \ | ||
--record \ | ||
--key 23c824d9-b9eb-4aea-88fd-d0bb06a9eb51 |