https://github.com/jazzsequence/launchcheck
Local WP environment for testing the WP-CLI launchcheck command
https://github.com/jazzsequence/launchcheck
Last synced: about 2 months ago
JSON representation
Local WP environment for testing the WP-CLI launchcheck command
- Host: GitHub
- URL: https://github.com/jazzsequence/launchcheck
- Owner: jazzsequence
- License: mit
- Created: 2023-05-04T16:49:48.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-17T01:13:03.000Z (over 1 year ago)
- Last Synced: 2025-04-11T17:47:12.299Z (12 months ago)
- Language: PHP
- Size: 31.5 MB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Launchcheck Test Environment
 
This is a test environment based on [Lando](https://docs.lando.dev/) for testing the Pantheon [launchcheck](https://github.com/pantheon-systems/wp_launch_check) [WP-CLI](https://wp-cli.org) command that also powers the Pantheon Status checks in the dashboard.
`wp_launch_check` is installed as a submodule which -- while yucky -- allows development to be done on launchcheck within the environment.
[Composer](https://getcomposer.org) is used to manage plugins and themes within the WordPress environment (although it may be more desirable to test plugin/theme installation using WP-CLI) but not to manage WordPress core itself. Composer scripts for running `wp_launch_check` are included in the `composer.json` file.
## Installation
Before you are able to run `launchcheck` you will need to setup your environment. You can run the `composer launchcheck:init` script to take care of this for you.
`launchcheck:init` also checks for the existence of [`jq`](https://stedolan.github.io/jq/) on your system. Using `jq` is optional, but it can be helpful to more easily parse JSON output when using the `--format=json` flag in `launchcheck` commands, e.g. `lando wp launchcheck config --format=json | jq`.
You can omit the `jq` check and just run the install by using `composer launchcheck:install` instead.
It's possible you might need to install WordPress core before your Lando box will run properly. There's a composer script to help with this as well: `composer install:wp`. This runs a `lando wp core install` using the `wp-config` file in this repository and creates a site with an admin user named `admin` with the password of `admin`.
## Running `launchcheck`
Once the Composer dependencies of `wp_launch_check` are installed (see the installation steps above), you can run the `launchcheck` command in this environment normally using `lando wp launchcheck`. (This is because the `wp_launch_check/vendor/autoload.php` file is included in the `wp-config.php` file.) To see a full list of commands, run `lando wp help launchcheck`.
Some `launchcheck` commands can output their data in JSON syntax using the `--format=json` flag. If you have `jq` installed, you can pipe the output to `jq` to have the JSON pretty-printed, e.g. `lando wp launchcheck config --format=json | jq`.
## A note about PHP 7.4
Yes, this environment is running PHP 7.4. This is because the Behat tests break with PHP 8+. Getting the Behat tests to work with PHP 8+ would require development investment which is outside the scope of this project at this time. If you want to run the Behat tests, you will need to run them with PHP 7.4 for the forseeable future.