2012-11-23 10:51:34 +00:00
|
|
|
language: php
|
2019-12-19 10:44:12 +00:00
|
|
|
dist: bionic
|
2012-11-23 10:51:34 +00:00
|
|
|
|
|
|
|
php:
|
2017-11-02 07:02:42 +00:00
|
|
|
- 7.2
|
2018-10-14 13:20:18 +00:00
|
|
|
- 7.3
|
2019-12-14 15:53:06 +00:00
|
|
|
- 7.4
|
2016-08-13 14:40:31 +00:00
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- vendor
|
|
|
|
- $HOME/.composer/cache
|
|
|
|
|
2015-05-11 10:30:15 +00:00
|
|
|
before_script:
|
2018-01-28 09:07:51 +00:00
|
|
|
# Deactivate xdebug
|
2019-12-19 10:03:04 +00:00
|
|
|
- phpenv config-rm xdebug.ini
|
2018-01-28 07:28:26 +00:00
|
|
|
- composer install --ignore-platform-reqs
|
2012-11-23 10:51:34 +00:00
|
|
|
|
|
|
|
script:
|
2020-07-25 21:17:26 +00:00
|
|
|
- ./vendor/bin/phpunit --color=always --coverage-text
|
2018-01-28 09:07:51 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
|
|
|
|
- stage: Code style
|
2020-04-27 09:33:44 +00:00
|
|
|
php: 7.4
|
2018-01-28 09:07:51 +00:00
|
|
|
script:
|
|
|
|
- ./vendor/bin/php-cs-fixer fix --diff --verbose --dry-run
|
2018-08-06 02:02:16 +00:00
|
|
|
- ./vendor/bin/phpcs --report-width=200 samples/ src/ tests/ --ignore=samples/Header.php --standard=PSR2 -n
|
2016-08-16 14:38:24 +00:00
|
|
|
|
2018-01-28 09:07:51 +00:00
|
|
|
- stage: Coverage
|
2020-04-27 09:33:44 +00:00
|
|
|
php: 7.4
|
2018-01-28 09:07:51 +00:00
|
|
|
script:
|
2019-12-19 10:03:04 +00:00
|
|
|
- pecl install pcov
|
|
|
|
- ./vendor/bin/phpunit --coverage-clover coverage-clover.xml
|
2018-01-28 09:07:51 +00:00
|
|
|
after_script:
|
|
|
|
- wget https://scrutinizer-ci.com/ocular.phar
|
|
|
|
- php ocular.phar code-coverage:upload --format=php-clover tests/coverage-clover.xml
|
2018-06-04 04:17:59 +00:00
|
|
|
|
2020-04-05 08:46:03 +00:00
|
|
|
- stage: API documentations
|
2020-06-29 01:15:42 +00:00
|
|
|
if: tag is present
|
2020-04-05 08:46:03 +00:00
|
|
|
php: 7.4
|
2018-06-04 04:17:59 +00:00
|
|
|
before_script:
|
2020-05-02 12:45:11 +00:00
|
|
|
- curl -LO https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.0.0-rc/phpDocumentor.phar
|
2018-06-04 04:17:59 +00:00
|
|
|
script:
|
2020-05-02 12:45:11 +00:00
|
|
|
- php phpDocumentor.phar --directory src/ --target docs/api
|
2018-06-04 04:17:59 +00:00
|
|
|
deploy:
|
|
|
|
provider: pages
|
|
|
|
skip-cleanup: true
|
2020-04-05 08:46:03 +00:00
|
|
|
local-dir: docs/api
|
2018-06-04 04:17:59 +00:00
|
|
|
github-token: $GITHUB_TOKEN
|