forked from opauth/opauth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
42 lines (37 loc) · 1.1 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
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
branches:
except:
- bundled
matrix:
include:
- php: 5.5
env:
- COVERALLS=1
- php: 5.5
env:
- PHPCS=1
before_script:
- composer self-update
- composer dump-autoload
- export PHP_VERSION=`php --version`;
- composer require guzzle/guzzle:~3.7
- bash -c "if [[ ! '$PHP_VERSION' =~ 'PHP 5.3' ]]; then composer require guzzlehttp/guzzle:~4.0; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then composer require --dev satooshi/php-coveralls:dev-master; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then composer install --dev --no-interaction --prefer-source; fi"
- sh -c "if [ '$PHPCS' = '1' ]; then pyrus install pear/PHP_CodeSniffer && phpenv rehash; fi"
script:
- sh -c "if [ '$COVERALLS' = '1' ]; then
phpunit --stderr --coverage-clover build/logs/clover.xml;
elif [ '$PHPCS' = '1' ]; then
phpcs -p --extensions=php --standard=PSR2 --ignore=*/vendor/* ./;
else
phpunit --stderr;
fi"
after_script:
- sh -c "if [ '$COVERALLS' = '1' ]; then php vendor/bin/coveralls -v; fi"