2016-05-25 11:46:13 +00:00
|
|
|
before_script:
|
|
|
|
# Install dependencies
|
2019-02-11 16:13:28 +00:00
|
|
|
- set -xe
|
|
|
|
- apt-get update -yqq
|
2019-02-11 16:32:00 +00:00
|
|
|
- apt-get install git zip unzip -yqq
|
2016-05-25 11:46:13 +00:00
|
|
|
|
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- test
|
|
|
|
- deploy
|
|
|
|
|
|
|
|
build:composer:
|
2018-12-13 22:45:55 +00:00
|
|
|
image: php:7.2
|
2016-05-25 11:46:13 +00:00
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- curl -sS https://getcomposer.org/installer | php
|
|
|
|
- php composer.phar install
|
|
|
|
cache:
|
2018-10-07 21:02:18 +00:00
|
|
|
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
|
2016-05-25 11:46:13 +00:00
|
|
|
paths:
|
|
|
|
- vendor/
|
|
|
|
|
2018-12-13 22:45:55 +00:00
|
|
|
test:7.1:
|
2016-05-25 11:46:13 +00:00
|
|
|
stage: test
|
2018-12-13 22:45:55 +00:00
|
|
|
image: php:7.1
|
2016-05-25 11:46:13 +00:00
|
|
|
script:
|
2019-02-11 16:13:28 +00:00
|
|
|
- vendor/bin/phpunit -c test/phpunit.xml
|
2016-05-25 11:46:13 +00:00
|
|
|
cache:
|
2018-10-07 21:02:18 +00:00
|
|
|
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
|
2016-05-25 11:46:13 +00:00
|
|
|
paths:
|
2018-10-07 21:02:18 +00:00
|
|
|
- vendor
|
2016-05-25 11:46:13 +00:00
|
|
|
|
2018-12-13 22:45:55 +00:00
|
|
|
test:7.2:
|
2016-05-25 11:46:13 +00:00
|
|
|
stage: test
|
2018-12-13 22:45:55 +00:00
|
|
|
image: php:7.2
|
2016-05-25 11:46:13 +00:00
|
|
|
script:
|
2019-02-11 16:13:28 +00:00
|
|
|
- vendor/bin/phpunit -c test/phpunit.xml
|
2016-05-25 11:46:13 +00:00
|
|
|
cache:
|
2018-10-07 21:02:18 +00:00
|
|
|
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
|
2016-05-25 11:46:13 +00:00
|
|
|
paths:
|
|
|
|
- vendor/
|
|
|
|
|
2019-01-11 22:32:56 +00:00
|
|
|
test:7.3:
|
|
|
|
stage: test
|
|
|
|
image: php:7.3
|
|
|
|
script:
|
2019-02-11 16:13:28 +00:00
|
|
|
- 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
|
2019-01-11 22:32:56 +00:00
|
|
|
- vendor/bin/phpunit -c test/phpunit.xml --coverage-text
|
|
|
|
cache:
|
|
|
|
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
|
|
|
|
paths:
|
|
|
|
- vendor/
|
|
|
|
|
2016-05-25 11:46:13 +00:00
|
|
|
release:
|
|
|
|
stage: deploy
|
2018-12-13 22:45:55 +00:00
|
|
|
image: php:7.2
|
2016-05-25 11:46:13 +00:00
|
|
|
only:
|
|
|
|
- master
|
|
|
|
script:
|
2019-02-11 16:13:28 +00:00
|
|
|
- pecl install xdebug
|
|
|
|
- docker-php-ext-enable xdebug
|
|
|
|
- vendor/bin/phpunit -c test/phpunit.xml --coverage-text
|
2016-05-25 11:46:13 +00:00
|
|
|
artifacts:
|
|
|
|
name: "${CI_BUILD_NAME}_${CI_BUILD_REF_NAME}"
|
|
|
|
paths:
|
|
|
|
- build/
|
2016-07-07 15:48:09 +00:00
|
|
|
expire_in: 3 weeks
|
2016-05-25 11:46:13 +00:00
|
|
|
cache:
|
2018-10-07 21:02:18 +00:00
|
|
|
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
|
2016-05-25 11:46:13 +00:00
|
|
|
paths:
|
|
|
|
- vendor/
|