Laravel docker container for ci test, it helps you to speed up test process
image: guessever/laravel-ci
services:
- mysql:5.7
variables:
MYSQL_DATABASE: database_name
MYSQL_ROOT_PASSWORD: root
cache:
paths:
- vendor/
test-migration:
script:
# Install project dependencies.
- composer install
# Set up project configuration
- cp .env.ci .env
# Migrate to database
- php artisan migrate
image: guessever/laravel-ci
definitions:
caches:
bundler: vendor/
services:
mysql:
image: mysql:5.7
environment:
MYSQL_DATABASE: database_name
MYSQL_ROOT_PASSWORD: root
caches:
- bundler
pipelines:
default:
- step:
name: test build
services:
- mysql
script:
# Install project dependencies.
- composer install
# Set up project configuration
- cp .env.ci .env
# Migrate to database
- php artisan migrate