Skip to content
Snippets Groups Projects
.gitlab-ci.yml 820 B
Newer Older
Tibo's avatar
Tibo committed
# https://hub.docker.com/_/php/
image: php:7.2

before_script:
  # Install git, the php image doesn't have installed
  - apt-get update -yqq
  - apt-get install git -yqq
  # Install composer
  - curl -sS https://getcomposer.org/installer | php
  # Install PHP-ZIP extension (used by composer)
  - apt-get install -yqq libzip-dev
  - docker-php-ext-install zip
  # Install xdebug extension (used for phpunit code coverage)
  - pecl install xdebug
  - docker-php-ext-enable xdebug
Tibo's avatar
Tibo committed
  - pecl install mongodb-1.4.4
  - docker-php-ext-enable mongodb
Tibo's avatar
Tibo committed
  # Install all project dependencies
Tibo's avatar
Tibo committed
  - cd web
  - php ../composer.phar install
Tibo's avatar
Tibo committed
  # setup Laravel
Tibo's avatar
Tibo committed
  - cp env.test .env
Tibo's avatar
Tibo committed
  - touch storage/app/db.sqlite
  - php artisan migrate
Tibo's avatar
Tibo committed


# Test with PHP7 
test:php72:
  image: php:7.2
  script:
Tibo's avatar
Tibo committed
    - vendor/bin/phpunit --coverage-text