56 lines
1.0 KiB
YAML
56 lines
1.0 KiB
YAML
before_script:
|
|
# Install dependencies
|
|
- bash CI/docker_install.sh > /dev/null
|
|
|
|
stages:
|
|
- build
|
|
- test
|
|
- deploy
|
|
|
|
build:composer:
|
|
image: php:7.1
|
|
stage: build
|
|
script:
|
|
- curl -sS https://getcomposer.org/installer | php
|
|
- php composer.phar install
|
|
cache:
|
|
key: "$CI_BUILD_REF/$CI_BUILD_REF_NAME"
|
|
paths:
|
|
- vendor/
|
|
|
|
test:7.0:
|
|
stage: test
|
|
image: php:7.0
|
|
script:
|
|
- vendor/bin/phpunit -c tests/phpunit.xml --coverage-text
|
|
cache:
|
|
key: "$CI_BUILD_REF/$CI_BUILD_REF_NAME"
|
|
paths:
|
|
- vendor/
|
|
|
|
test:7.1:
|
|
stage: test
|
|
image: php:7.1
|
|
script:
|
|
- vendor/bin/phpunit -c tests/phpunit.xml --coverage-text
|
|
cache:
|
|
key: "$CI_BUILD_REF/$CI_BUILD_REF_NAME"
|
|
paths:
|
|
- vendor/
|
|
|
|
release:
|
|
stage: deploy
|
|
image: php:7.1
|
|
only:
|
|
- master
|
|
script:
|
|
- vendor/bin/phpunit -c tests/phpunit.xml --coverage-text
|
|
artifacts:
|
|
name: "${CI_BUILD_NAME}_${CI_BUILD_REF_NAME}"
|
|
paths:
|
|
- build/
|
|
expire_in: 3 weeks
|
|
cache:
|
|
key: "$CI_BUILD_REF/$CI_BUILD_REF_NAME"
|
|
paths:
|
|
- vendor/ |