A PHPUnit image with SQLite for running Drupal 8 Unit and Kernel tests.
docker run -it --rm -v /path/to/tests:/app millerrs/phpunit-drupal8
or
docker run -it --rm -v /path/to/project:/app millerrs/phpunit-drupal8 phpunit -c path/to/custom/config path/to/tests
stage('Run Unit Tests') {
agent {
docker {
image 'millerrs/phpunit-drupal8'
}
}
steps {
sh 'phpunit -c web/core web/modules/custom'
}
}