Skip to content

Latest commit

 

History

History
62 lines (41 loc) · 1.36 KB

CONTRIBUTING.md

File metadata and controls

62 lines (41 loc) · 1.36 KB

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Prepare local environment

Requirements

  • git
  • docker
  • docker-compose

Init local environment

  1. Clone this repository
  2. Init docker containers
   docker-composer -f docker\docker-compose.yaml up
  1. Access http://localhost:88/wp-admin in your browser and set up WordPress

Running tests on local environment

  1. Connect to docker container
   docker exec -it wordpress /bin/bash
  1. Go to the dev folder
   cd /var/www/dev
  1. Run the Unit tests
   vendor/bin/phpunit --testsuite "Unit" --coverage-text
  1. Run the Feature tests
   vendor/bin/phpunit --testsuite "Feature" --coverage-text
  1. Check plugin. This script will do all the checks for the plugin. See composer.json -> scripts for more details
    composer check-plugin

Pull Request Process

  1. Ensure any install or build dependencies are removed.
  2. Write tests for the new added code
  3. Run composer check-plugin on your local docker and make sure all checks pass