blob: a46ee4775bef21df0c6a4f1546abbb740f41e0a7 (
plain) (
tree)
|
|
# Select image from https://hub.docker.com/_/php/
image: php:7
# Select what we should cache
cache:
paths:
- vendor/
before_script:
# Install git, the php image doesn't have installed
- apt-get update -yqq
- apt-get install git -yqq
- apt-get install php-gd -yqq
# Install mysql driver
- docker-php-ext-install pdo_mysql
# Install composer
- curl -sS https://getcomposer.org/installer | php
# Install all project dependencies
- php composer.phar install
services:
- mysql
variables:
# Configure mysql service (https://hub.docker.com/_/mysql/)
MYSQL_DATABASE: hello_world_test
MYSQL_ROOT_PASSWORD: mysql
# We test PHP5.6 (the default) with MySQL
test:mysql:
script:
- vendor/bin/phpunit --configuration phpunit_mysql.xml --coverage-text
|