-
-
Notifications
You must be signed in to change notification settings - Fork 408
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test: Add PDF service in E2E * test(e2e): change PDF approach to work with headless browsers
- Loading branch information
Showing
18 changed files
with
182 additions
and
20 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
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
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
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
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
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
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,12 +1,14 @@ | ||
#!/bin/bash | ||
|
||
mkdir -p logs | ||
|
||
echo "> Starting maildev server" | ||
npx [email protected] & | ||
MAILDEV_PID=$! | ||
|
||
echo "> Starting stripe webhook listener" | ||
export STRIPE_WEBHOOK_SIGNING_SECRET=$(stripe --api-key $STRIPE_WEBHOOK_KEY listen --forward-connect-to localhost:3060/webhooks/stripe --print-secret) | ||
stripe --api-key $STRIPE_WEBHOOK_KEY listen --forward-connect-to localhost:3060/webhooks/stripe > /dev/null & | ||
stripe --api-key $STRIPE_WEBHOOK_KEY listen --forward-connect-to localhost:3060/webhooks/stripe >/dev/null & | ||
STRIPE_WEBHOOK_PID=$! | ||
|
||
echo "> Starting api server" | ||
|
@@ -35,10 +37,20 @@ if [ -z "$IMAGES_FOLDER" ]; then | |
else | ||
cd $IMAGES_FOLDER | ||
fi | ||
npm start & | ||
npm start >../logs/images-service.txt 2>&1 & | ||
IMAGES_PID=$! | ||
cd - | ||
|
||
echo "> Starting PDF server" | ||
if [ -z "$PDF_FOLDER" ]; then | ||
cd ~/pdf | ||
else | ||
cd $PDF_FOLDER | ||
fi | ||
PORT=3002 npm start >../logs/pdf-service.txt 2>&1 & | ||
PDF_PID=$! | ||
cd - | ||
|
||
# Set `$CYPRESS_RECORD` to `true` in ENV to activate records | ||
if [ "$CYPRESS_RECORD" = "true" ]; then | ||
CYPRESS_RECORD="--record" | ||
|
@@ -71,6 +83,8 @@ echo "" | |
wait_for_service Frontend 127.0.0.1 3000 | ||
echo "" | ||
wait_for_service IMAGES 127.0.0.1 3001 | ||
echo "" | ||
wait_for_service PDF 127.0.0.1 3002 | ||
|
||
echo "" | ||
echo "> Running cypress tests" | ||
|
@@ -80,15 +94,16 @@ npm run cypress:run -- ${CYPRESS_RECORD} --env OC_ENV=$OC_ENV --spec "test/cypre | |
RETURN_CODE=$? | ||
if [ $RETURN_CODE -ne 0 ]; then | ||
echo "Error with cypress e2e tests, exiting" | ||
exit 1; | ||
exit 1 | ||
fi | ||
echo "" | ||
|
||
echo "Killing all node processes" | ||
kill $MAILDEV_PID; | ||
kill $MAILDEV_PID | ||
kill $STRIPE_WEBHOOK_PID | ||
kill $API_PID; | ||
kill $FRONTEND_PID; | ||
kill $IMAGES_PID; | ||
kill $API_PID | ||
kill $FRONTEND_PID | ||
kill $IMAGES_PID | ||
kill $PDF_PID | ||
echo "Exiting with code $RETURN_CODE" | ||
exit $RETURN_CODE |
Oops, something went wrong.
f1096f6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
opencollective-frontend – ./
opencollective-frontend-git-main-opencollective.vercel.app
vercel.opencollective.com
opencollective-frontend-opencollective.vercel.app
next-images.opencollective.com
f1096f6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
opencollective-styleguide – ./
styleguide.opencollective.com
styleguide-eight.vercel.app
opencollective-styleguide-git-main-opencollective.vercel.app
opencollective-styleguide-opencollective.vercel.app
www.styleguide.opencollective.com