VIP Go mu-plugins
This is the development repo for mu-plugins on VIP Go,
You can find selective PHPDoc documentation here: https://automattic.github.io/vip-go-mu-plugins/
These are generated via CI by the
We have a script that runs unit tests in a self-contained Docker environment.
usage: ./bin/phpunit-docker.sh [wp-version]
You can either pass a version number to test against a specific version, or leave it blank to test against the latest version.
Set up VVV and your vagrant environment
Navigate to your
wp-contentfolder and clone this repo into
$ git clone https://github.com/Automattic/vip-go-mu-plugins.git mu-plugins
- SSH into your box and navigate to the
$ vagrant ssh vagrant@vvv:~$cd /path/to/wp-content/mu-plugins
- Setup the WordPress tests:
vagrant@vvv: vagrant@vvv:/wp-content/mu-plugins$ ./bin/install-wp-tests.sh %empty_DB_name% %db_user% %db_name%
Note: you need to replace the
%placeholder% strings above with the appropriate values. Use a separate test database for this as the contents will get trashed during testing.
- Install dependencies
Note: need to have composer pre-installed.
- Run tests:
PHP Linting and PHPUnit tests are also run by Travis as part of PRs and merges. See the
script section of
For Automattic Use: Instructions are in the FG :)
This is a repo primarily meant for local non-development use. It e
Every commit merged into
master is automatically pushed to the public copy at Automattic/vip-go-mu-plugins-built. This is handled via CI by the
deploy.sh script script, which builds pushes a copy of this repo and expanded submodules.
How this works
- The private part of a deploy key for Automattic/vip-mu-plugins-built is encrypted against this repository (Automattic/vip-mu-plugins-built), meaning it can only be decrypted by Travis running scripts related to this repo
- This repository and it's submodules are checked out, again, to start the build
- All VCS config and metadata is removed from the build
- Various files are removed, including the
.travis.ymlcontaining the encrypted private part of the deploy key
- The Automattic/vip-mu-plugins-built repo is checked out
.gitdirectory from the
Automattic/vip-go-mu-plugins-builtrepository is moved into the build directory, and a commit is created representing the changes from this build
- The commit is pushed to the