Implemented minor documentation and continuous integration
parent
0d867c7371
commit
593be6b5d0
@ -0,0 +1,80 @@
|
||||
before_script:
|
||||
# Install dependencies
|
||||
- set -xe
|
||||
- apt-get update -yqq
|
||||
- apt-get install git zip unzip -yqq
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- deploy
|
||||
|
||||
build:composer:
|
||||
image: php:7.2
|
||||
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.1:
|
||||
stage: test
|
||||
image: php:7.1
|
||||
script:
|
||||
- vendor/bin/phpunit -c test/phpunit.xml
|
||||
cache:
|
||||
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
|
||||
paths:
|
||||
- vendor
|
||||
|
||||
test:7.2:
|
||||
stage: test
|
||||
image: php:7.2
|
||||
script:
|
||||
- vendor/bin/phpunit -c test/phpunit.xml
|
||||
cache:
|
||||
key: "$CI_BUILD_REF_$CI_BUILD_REF_NAME"
|
||||
paths:
|
||||
- vendor/
|
||||
|
||||
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"
|
||||
paths:
|
||||
- vendor/
|
||||
|
||||
release:
|
||||
stage: deploy
|
||||
image: php:7.2
|
||||
only:
|
||||
- master
|
||||
script:
|
||||
- vendor/bin/phpunit -c test/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/
|
@ -0,0 +1,12 @@
|
||||
language: php
|
||||
|
||||
php:
|
||||
- 7.1
|
||||
- 7.2
|
||||
- 7.3
|
||||
|
||||
script:
|
||||
- php vendor/bin/phpunit -v -c test/phpunit.xml --coverage-text
|
||||
|
||||
before_script:
|
||||
- composer install
|
Loading…
Reference in New Issue