This repository has been archived by the owner on Jan 2, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
40 lines (34 loc) · 2.02 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
language: php
sudo: false
php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm
os:
- linux
before_script:
- if [ "`phpenv version-name`" != "hhvm" ]; then echo 'opcache.enable=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
- if [ "`phpenv version-name`" != "hhvm" ]; then echo 'opcache.enable_cli=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
- if [ "`phpenv version-name`" == "hhvm" ]; then echo 'opcache.enable=1' >> /etc/hhvm/php.ini; fi
- if [ "`phpenv version-name`" == "hhvm" ]; then echo 'opcache.enable_cli=1' >> /etc/hhvm/php.ini; fi
- composer self-update
- composer install -o --prefer-source
- mkdir tests/resources/cache/
- chmod -R 777 tests/resources/cache/
script:
# xdebug is not installed on HHVM and PHP 7, so we are skipping the creation of code coverage data there
- if [ "`phpenv version-name`" == "5.3" ] || [ "`phpenv version-name`" == "5.4" ] || [ "`phpenv version-name`" == "5.5" ] || [ "`phpenv version-name`" == "5.6" ]; then vendor/bin/phpunit --colors --verbose --coverage-clover=coverage.clover; fi
- if [ "`phpenv version-name`" != "5.3" ] && [ "`phpenv version-name`" != "5.4" ] && [ "`phpenv version-name`" != "5.5" ] && [ "`phpenv version-name`" != "5.6" ]; then vendor/bin/phpunit --colors --verbose; fi
- vendor/bin/phpcs --standard=psr2 -np src tests
- vendor/bin/php-cs-fixer fix --dry-run -vv
after_script:
- rm -R -f -d tests/resources/cache/
- rmdir tests/resources/cache/
# xdebug is not installed on HHVM and PHP 7, so we have no code coverage data to send
- if [ "`phpenv version-name`" == "5.3" ] || [ "`phpenv version-name`" == "5.4" ] || [ "`phpenv version-name`" == "5.5" ] || [ "`phpenv version-name`" == "5.6" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "`phpenv version-name`" == "5.3" ] || [ "`phpenv version-name`" == "5.4" ] || [ "`phpenv version-name`" == "5.5" ] || [ "`phpenv version-name`" == "5.6" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
notifications:
email: false