-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.travis.yml
52 lines (41 loc) · 1.77 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
matrix:
fast_finish: true
include:
# Linux
- os: linux
language: php
php: '5.6'
- os: linux
language: php
php: '7.0'
- os: linux
language: php
php: 'nightly'
# Mac OS X
- os: osx
env: OSX_PHP_VERSION=php56
- os: osx
env: OSX_PHP_VERSION=php70
allow_failures:
# Because Homebrew is building PHP 7.0 from sources, this slows builds a lot; do not wait for PHP 7 on Mac
- os: osx
env: OSX_PHP_VERSION=php70
install:
- if [[ $TRAVIS_OS_NAME == 'osx' ]] ; then brew update ; fi; # travis image is quite old, update to have latest dependecies available
- if [[ $TRAVIS_OS_NAME == 'osx' ]] ; then brew tap homebrew/dupes ; fi;
- if [[ $TRAVIS_OS_NAME == 'osx' ]] ; then brew tap homebrew/versions ; fi;
- if [[ $TRAVIS_OS_NAME == 'osx' ]] ; then brew tap homebrew/homebrew-php ; fi;
- if [[ $TRAVIS_OS_NAME == 'osx' ]] ; then brew install ${OSX_PHP_VERSION} ; fi; # install PHP
- if [[ $TRAVIS_OS_NAME == 'osx' ]] ; then curl -sS https://getcomposer.org/installer | php ; fi; # install composer
- if [[ $TRAVIS_OS_NAME == 'osx' ]] ; then mv composer.phar /usr/local/bin/composer | php ; fi; # install composer globally
- if [[ $TRAVIS_OS_NAME == 'osx' ]] ; then export PATH="$(brew --prefix homebrew/php/${OSX_PHP_VERSION})/bin:$PATH" ; fi; # app php to path
- if [[ $TRAVIS_OS_NAME == 'osx' ]] ; then brew install coreutils ; fi; # truncate command:
before_script:
- composer install --no-interaction --prefer-dist
- if [[ $TRAVIS_OS_NAME == 'linux' ]] ; then bash tests/setup-linux.sh ; fi;
- if [[ $TRAVIS_OS_NAME == 'osx' ]] ; then bash tests/setup-osx.sh ; fi;
- vendor/bin/tester -i
script:
- vendor/bin/tester -c tests/php-unix.ini -s tests
after_script:
- bash tests/cleanup.sh