Sign inSign up

inoutput/laravel-bitbucket-pipelines

By inoutput

•Updated about 9 years ago

Docker image for running Laravel Unit, Feature and Dusk tests.

Image
2

8.1K

inoutput/laravel-bitbucket-pipelines repository overview

Docker image for running Laravel Unit, Feature and Dusk tests.

Software installed:

  • git
  • composer
  • php 7.1
  • nodejs 8.x
  • yarn
  • nginx
  • Postgres
  • memcached
  • redis
  • supervisor
  • Laravel Dusk Support (chromium-browser, xvfb)

Two postgres database are created:

  • homestead
  • testing

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');
        }

Tag summary

Content type

Image

Digest

Size

439.4 MB

Last updated

about 9 years ago

docker pull inoutput/laravel-bitbucket-pipelines