Closed earnjam closed 4 years ago
Looks great, but given the state of the checks on this PR, it looks like we need to make sure
composer install
is run.
haha, yep. Working on it 😄 . It wasn't an issue locally since I'd already run it manually.
One downside of this vs other PHPUnit testing options is the Docker requirement. The upside of it is that the testing setup is identical when run locally to when it's run on GitHub.
It also seems like we're standardizing on Docker as the local development environment of choice for our projects (typically through Lando or @wordpress/env
), so I think I'm ok with it.
I changed wp-phpunit
version requirement to *
so that it always uses the latest version instead of being hardcoded to a specific version. That way it should always match what gets set in wp-env
and we won't have to update it every release.
This PR does a few things:
1) Adds a
@wordpress/env
setup to the repo. This is a simple docker-based standardized local environment that can be used for testing or development. 1) Sets up additional scripts inpackage.json
so testing all testing/linting commands can be run throughnpm run
in addition to thewp-env
setup. 1) Adds some GitHub Actions to automate running the phpunit tests and code linting on any pull requests or pushes tomaster
. 1) Cleans up all coding standards violations in the file, since we'll be linting it against our Bluehost WP Coding Standards on PRs now.