Core/.gitlab-ci.yml

56 lines
1.0 KiB
YAML
Raw Normal View History

2016-05-25 11:46:13 +00:00
before_script:
# Install dependencies
- bash CI/docker_install.sh > /dev/null
stages:
- build
- test
- deploy
build:composer:
image: php:7.1
2016-05-25 11:46:13 +00:00
stage: build
script:
- curl -sS https://getcomposer.org/installer | php
- php composer.phar install
cache:
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
2016-05-25 11:46:13 +00:00
paths:
- vendor/
test:7.0:
2016-05-25 11:46:13 +00:00
stage: test
image: php:7.0
2016-05-25 11:46:13 +00:00
script:
- vendor/bin/phpunit -c tests/phpunit.xml --coverage-text
2016-05-25 11:46:13 +00:00
cache:
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
2016-05-25 11:46:13 +00:00
paths:
- vendor
2016-05-25 11:46:13 +00:00
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 tests/phpunit.xml --coverage-text
2016-05-25 11:46:13 +00:00
cache:
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
2016-05-25 11:46:13 +00:00
paths:
- vendor/
release:
stage: deploy
image: php:7.1
2016-05-25 11:46:13 +00:00
only:
- master
script:
- vendor/bin/phpunit -c tests/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:
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
2016-05-25 11:46:13 +00:00
paths:
- vendor/