Skip to content

Commit

Permalink
chore: streamline wp-env startup logic in test script
Browse files Browse the repository at this point in the history
  • Loading branch information
lgersman committed Nov 18, 2024
1 parent 3b1e1da commit 9a688f4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@ fi
# execute playwright tests
pnpm exec playwright test -c ./playwright-ct.config.js $@

exit 0

WPENV_INSTALLPATH="$(realpath --relative-to $(pwd) $(pnpm exec wp-env install-path))"

#region start wp-env if it is not running
# ensure wp-env is running
# - if the install path does not exist
# - or if the containers are not running
WPENV_INSTALLPATH="$(realpath --relative-to $(pwd) $(pnpm exec wp-env install-path))"
if [[ ! -d "$WPENV_INSTALLPATH/WordPress" ]] || [[ "$(docker ps -q --filter "name=$(basename $WPENV_INSTALLPATH)" | wc -l)" != '6' ]]; then
pnpm start
fi
Expand Down

0 comments on commit 9a688f4

Please sign in to comment.