Docker image for running Laravel Unit, Feature and Dusk tests.
8.1K
Docker image for running Laravel Unit, Feature and Dusk tests.
Software installed:
Two postgres database are created:
To use the image in Bitbucket pipeline, put the following inside bitbucket-pipelines.yml (change things based on your project structure & needs):
image: inoutput/laravel-bitbucket-pipelines pipelines: default: - step: script: - sudo service postgresql start - cd sourcecode - cp .env.pipelines .env - composer install - yarn install - yarn run dev - chmod -R 775 vendor/laravel/dusk/bin - php artisan key:generate - php artisan migrate - vendor/bin/phpunit - vendor/laravel/dusk/bin/chromedriver-linux & - php artisan serve & - php artisan dusk
Note: make sure you have APP_ENV_DOCKER=true in your .env.pipelines file, as Dusk needs it to talk to the headless chrome browser with the --no-sandbox option. In tests\DuskTestCase.php you will find:
$chromeOptions = [
'--disable-gpu',
'--headless',
];
if (env('APP_ENV_DOCKER')) {
array_push($chromeOptions, '--no-sandbox');
}
Content type
Image
Digest
Size
439.4 MB
Last updated
about 9 years ago
docker pull inoutput/laravel-bitbucket-pipelines