Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try switching wordpress install in travis to wp-env #22303

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 3 additions & 35 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,44 +53,12 @@ install:
- npm run build
- |
if [[ "$INSTALL_WORDPRESS" = "true" ]]; then
# Download and unpack WordPress.
curl -sL https://github.com/WordPress/WordPress/archive/master.zip -o /tmp/wordpress-latest.zip
unzip -q /tmp/wordpress-latest.zip -d /tmp
mkdir -p wordpress/src
mv /tmp/WordPress-master/* wordpress/src

# Create the upload directory with permissions that Travis can handle.
mkdir -p wordpress/src/wp-content/uploads
chmod 767 wordpress/src/wp-content/uploads

# Grab the tools we need for WordPress' local-env.
curl -sL https://github.com/WordPress/wordpress-develop/archive/master.zip -o /tmp/wordpress-develop.zip
unzip -q /tmp/wordpress-develop.zip -d /tmp
mv \
/tmp/wordpress-develop-master/tools \
/tmp/wordpress-develop-master/tests \
/tmp/wordpress-develop-master/.env \
/tmp/wordpress-develop-master/docker-compose.yml \
/tmp/wordpress-develop-master/wp-cli.yml \
/tmp/wordpress-develop-master/*config-sample.php \
/tmp/wordpress-develop-master/package.json wordpress

# Install WordPress. The additional dependencies are required by the copied `wordpress-develop` tools.
cd wordpress
npm install dotenv wait-on
npm run env:start
sleep 10
npm run env:install
cd ..

# Connect Gutenberg to WordPress.
npm run env connect
npm run env cli plugin activate gutenberg
npm run wp-env start
fi
- |
if [[ "$E2E_ROLE" = "author" ]]; then
npm run env cli -- user create author [email protected] --role=author --user_pass=authpass
npm run env cli -- post update 1 --post_author=2
npm run wp-env run tests-cli "wp user create author [email protected] --role=author --user_pass=authpass"
npm run wp-env run tests-cli "wp post update 1 --post_author=2"
fi

jobs:
Expand Down