forked from PHPOffice/PhpSpreadsheet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
58 lines (50 loc) · 1.64 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
language: php
dist: trusty
php:
- 7.1
- 7.2
- 7.3
- 7.4snapshot
cache:
directories:
- cache
- vendor
- $HOME/.composer/cache
before_script:
# Deactivate xdebug
- if [ -z "$KEEP_XDEBUG" ]; then rm -rfv /home/travis/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ; fi
- composer install --ignore-platform-reqs
script:
- ./vendor/bin/phpunit
jobs:
include:
- stage: Code style
php: 7.2
script:
- ./vendor/bin/php-cs-fixer fix --diff --verbose --dry-run
- ./vendor/bin/phpcs --report-width=200 samples/ src/ tests/ --ignore=samples/Header.php --standard=PSR2 -n
- stage: Coverage
php: 7.2
env: KEEP_XDEBUG=1
script:
- travis_wait 40 ./vendor/bin/phpunit --debug --coverage-clover coverage-clover.xml
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
local-dir: build
github-token: $GITHUB_TOKEN
on:
all_branches: true
condition: $TRAVIS_BRANCH =~ ^master$