Tried something like
image: php:7-fpm
pipelines:
default:
- step:
script:
- apt-get update && apt-get install -qy git curl libmcrypt-dev mysql-client zip unzip
- yes | pecl install mcrypt-1.0.1
- docker-php-ext-install pdo_mysql
- bash ./install-composer.sh
- composer install
- ln -f -s .env.pipelines .env
- php artisan migrate
- php artisan serve &
- sleep 3
- ./vendor/bin/phpunit
- curl -vk http://localhost:8000
services:
- mysql
definitions:
services:
mysql:
image: mysql:5.7
environment:
MYSQL_DATABASE: 'homestead'
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_USER: 'homestead'
MYSQL_PASSWORD: 'secret'
or
image: php:7-fpm
pipelines:
default:
- step:
script:
- apt-get update
- apt-get install zip -y
- apt-get install unzip -y
- apt-get install libzip-dev -y
- apt-get install jpegoptim -y
- apt-get install optipng -y
- apt-get install curl -y
- apt-get install curl -y
- apt-get install mysql-client -y
- apt-get install unzip -y
- docker-php-ext-install zip
- docker-php-ext-install gmp
- docker-php-ext-install bcmath
- docker-php-ext-install pdo_mysql
- yes | pecl install mcrypt-1.0.1
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install
- php -r "file_exists('.env') || copy('.env.dist', '.env');"
- php artisan key:generate
- php artisan migrate:fresh --seed
- sleep 3
- ./vendor/bin/phpunit
services:
- mysql
definitions:
services:
mysql:
image: mysql:5.7
environment:
MYSQL_DATABASE: 'homestead'
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_USER: 'homestead'
MYSQL_PASSWORD: 'secret'
all functional tests fail, except unit. unit tests work fine.

