PhpSpreadsheet/.travis.yml

61 lines
1.6 KiB
YAML
Raw Normal View History

2012-11-23 10:51:34 +00:00
language: php
dist: xenial
2012-11-23 10:51:34 +00:00
php:
2016-08-13 14:45:37 +00:00
- 7.1
2017-11-02 07:02:42 +00:00
- 7.2
2018-10-14 13:20:18 +00:00
- 7.3
- 7.4
cache:
directories:
2018-06-04 04:49:07 +00:00
- cache
- vendor
- $HOME/.composer/cache
2015-05-11 10:30:15 +00:00
before_script:
2018-01-28 09:07:51 +00:00
# Deactivate xdebug
- phpenv config-rm xdebug.ini
- composer install --ignore-platform-reqs
2012-11-23 10:51:34 +00:00
script:
2018-01-28 09:07:51 +00:00
- ./vendor/bin/phpunit
jobs:
include:
- stage: Code style
php: 7.2
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
php: 7.2
2018-01-28 09:07:51 +00:00
script:
- pecl install pcov
- composer require pcov/clobber --dev
- ./vendor/bin/pcov clobber
- ./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
- stage: API documentation
php: 7.2
before_script:
- curl -O https://get.sensiolabs.org/sami.phar
script:
- git fetch origin master:master
- git fetch origin --tags
- php sami.phar update .sami.php
- echo '<html><head><meta http-equiv="Refresh" content="0; url=master/"></head><body><p>If you are not automatically redirected, please go to <a href="master/">the latest stable API documentation</a>.</p></body></html>' > build/index.html
deploy:
provider: pages
skip-cleanup: true
2018-06-04 05:04:48 +00:00
local-dir: build
github-token: $GITHUB_TOKEN
on:
all_branches: true
condition: $TRAVIS_BRANCH =~ ^master$