aboutsummaryrefslogblamecommitdiffstats
path: root/.gitlab-ci.yml
blob: 724e825ee89684e6cef8c5a4a51641e63f75dd85 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
                                                 
              










                                                   

                                                              

                                                                                             
 


                                  













                                                             
                                       



                                                                        
 
# Select image from https://hub.docker.com/_/php/
image: php:7.1

# 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

# Install php-gd 
- apt-get -yqq libfreetype6-dev libjpeg62-turbo-dev libpng-dev
- docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
- docker-php-ext-install -j$(nproc) gd

# 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 PHP7 (the default) with MySQL
test:mysql:
  script:
  - vendor/bin/phpunit --configuration phpunit_mysql.xml --coverage-text