-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ensure webpack is built before e2e tests (#1171)
* Add test_e2e script * Fix typo * remove build webpack * rename build:webpack:serve -> webpack:serve * Add rationale for writeToDisk
- Loading branch information
1 parent
05df012
commit 86ed293
Showing
4 changed files
with
42 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
RED='\033[0;31m' | ||
GREEN='\033[0;32m' | ||
YELLOW='\033[0;33m' | ||
RESET='\033[0m' | ||
|
||
if [[ "$NODE_ENV" == "development" ]]; then | ||
# Check if the webpack server is responsive | ||
if ! nc -z -w 10 "$WEBPACK_HOST" "$WEBPACK_PORT"; then | ||
echo -e "${YELLOW}Webpack server at $WEBPACK_HOST:$WEBPACK_PORT is not responsive." | ||
echo -e "Run webpack server in the background for faster start-up times." | ||
echo -e "\n\t yarn webpack:serve \n${RESET}" | ||
|
||
echo "Building webpack..." | ||
if ! yarn build:webpack:dev; then | ||
echo -e "\n${RED}Command 'yarn build:webpack:dev' failed. Exiting...${RESET}\n" | ||
exit 1 | ||
fi | ||
else | ||
echo -e "${GREEN}Found Webpack server at $WEBPACK_HOST:$WEBPACK_PORT, skipping manual build.${RESET}" | ||
fi | ||
fi | ||
|
||
playwright test $@ |