Runs Drupal webtests and php unit tests using Docker containers. This can be used with Git webhooks but its not ready yet.
The parameters for the runtests.php script are:
- --project Project or module name
- --version Project version or branch name [optional]. The format is the same as used in Composer
- --vcs Fork url [optional]
- --profile Drupal install profile [optional]
- --patches Specifies a list of patches to be applied. See example below.
- --dependencies List of test dependencies [optional] i.e. "drupal/link:* drupal/email:^1.0"
Run tests from the released version of Captcha Keypad module
docker run --name drupalci --rm dennisdigital/drupalci:9-apache \
--project captcha_keypad \
--version ^1.0.0docker run --name drupalci --rm dennisdigital/drupalci:8-apache \
--project captcha_keypad \
--version ^1.0.0docker run --name drupalci --rm dennisdigital/drupalci:7-apache \
--project captcha_keypad \
--version ^1.0.0To run tests from the a forked branch you can use --version with the branch. See Non feature branches. You can also specify the repository using --vcs.
docker run --name drupalci --rm dennisdigital/drupalci:8-apache \
--project captcha_keypad \
--version dev-8.x-1.x \
--vcs https://github.com/dennisdigital/captcha_keypad.gitYou can provide a list of patches to be applied to the project.
docker run --name drupalci --rm dennisdigital/drupalci:7-apache \
--project amp \
--version dev-1.x \
--patches https://www.drupal.org/files/issues/2019-02-11/amp-initial-page-load-3031306-18.patchFor multiple patches, each Url needs to be separated by comma.
docker run --name drupalci --rm dennisdigital/drupalci:7-apache \
--project captcha_keypad \
--version dev-1.x \
--patches "https://www.example.com/fix-1.patch, https://www.example.com/fix-2.patch"Used to install test dependencies or any addicional package.
docker run --name drupalci --rm dennisdigital/drupalci:7-apache \
--project amp \
--version dev-1.x \
--dependencies "drupal/media:* \
drupal/ctools:* \
drupal/token:* \
drupal/google_analytics:* \
drupal/dfp:* \
drupal/context:* \
drupal/adsense:*"You can mount the verbose folder using -v, then you can see the generated output.
docker run -v ~/Downloads/results:/results --name drupalci --rm dennisdigital/drupalci:8-apache \
--project sharerich \
--version dev-1.x \
--dependencies "drupal/token:*"
ls ~/Downloads/verboseCopy the .circleci folder into your module, remame config.yml.example to config.yml and enable Circle CI for your project. When you make commits it will automatically trigger the build an you will be able to access the verbose results via Artifacts tab on Circle CI.
Building images
./build_all.sh
Building and deploying
./build_deploy_all.sh