Implemented changes to gitlab-ci.yml. Fixes #138.

This commit is contained in:
Abel Hoogeveen 2019-02-11 17:13:28 +01:00
parent 5a6b52f93d
commit 959540bba4
No known key found for this signature in database
GPG Key ID: 96C2234920BF4292
2 changed files with 20 additions and 18 deletions

View File

@ -1,6 +1,8 @@
before_script:
# Install dependencies
- bash CI/docker_install.sh > /dev/null
- set -xe
- apt-get update -yqq
- apt-get install git zip inzip -yqq
stages:
- build
@ -22,7 +24,7 @@ test:7.1:
stage: test
image: php:7.1
script:
- vendor/bin/phpunit -c test/phpunit.xml --coverage-text
- vendor/bin/phpunit -c test/phpunit.xml
cache:
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
paths:
@ -32,7 +34,7 @@ test:7.2:
stage: test
image: php:7.2
script:
- vendor/bin/phpunit -c test/phpunit.xml --coverage-text
- vendor/bin/phpunit -c test/phpunit.xml
cache:
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
paths:
@ -42,6 +44,18 @@ test:7.3:
stage: test
image: php:7.3
script:
- vendor/bin/phpunit -c test/phpunit.xml
cache:
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
paths:
- vendor/
test:coverage:
stage: test
image: php:7.2
script:
- pecl install xdebug
- docker-php-ext-enable xdebug
- vendor/bin/phpunit -c test/phpunit.xml --coverage-text
cache:
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
@ -54,7 +68,9 @@ release:
only:
- master
script:
- vendor/bin/phpunit -c test/phpunit.xml --coverage-text
- pecl install xdebug
- docker-php-ext-enable xdebug
- vendor/bin/phpunit -c test/phpunit.xml --coverage-text
artifacts:
name: "${CI_BUILD_NAME}_${CI_BUILD_REF_NAME}"
paths:

View File

@ -1,14 +0,0 @@
#!/bin/bash
# We need to install dependencies only for Docker
[[ ! -e /.dockerenv ]] && [[ ! -e /.dockerinit ]] && exit 0
set -xe
# Install git (the php image doesn't have it) which is required by composer
apt-get update -yqq
apt-get install git zip unzip -yqq
# Install xdebug
pecl install xdebug
docker-php-ext-enable xdebug