forked from ApiGen/ApiGen
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
33 lines (27 loc) · 911 Bytes
/
.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
language: php
sudo: false
matrix:
include:
- php: 7.1
# add variables to enable coverage, coding standard check and static analysis
env: PHPUNIT_FLAGS="--coverage-clover coverage.xml" CHECK_CS=1 RUN_PHPSTAN=1
install:
# install composer dependencies
- composer install
script:
# run tests
- vendor/bin/phpunit $PHPUNIT_FLAGS
# check coding standard (defined in composer.json "scripts" section)
- if [[ $CHECK_CS = 1 ]]; then composer check-cs; fi
# check with phpstan (defined in composer.json "scripts" section)
- if [[ $RUN_PHPSTAN = 1 ]]; then composer phpstan; fi
after_script:
# upload coverage.xml file to Scrutinizer to analyze it
- |
if [[ $PHPUNIT_FLAGS != "" ]]; then
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.xml
fi
- ./generate-api.sh
notifications:
email: false