Core/.gitlab-ci.yml

82 lines
1.5 KiB
YAML
Raw Normal View History

2016-05-25 11:46:13 +00:00
before_script:
# Install dependencies
- set -xe
- apt-get update -yqq
- apt-get install git zip inzip -yqq
2016-05-25 11:46:13 +00:00
stages:
- build
- test
- deploy
build:composer:
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/
test:7.1:
2016-05-25 11:46:13 +00:00
stage: test
image: php:7.1
2016-05-25 11:46:13 +00:00
script:
- 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
test:7.2:
2016-05-25 11:46:13 +00:00
stage: test
image: php:7.2
2016-05-25 11:46:13 +00:00
script:
- 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:
- 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
image: php:7.2
2016-05-25 11:46:13 +00:00
only:
- master
script:
- 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/
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/