one more travis
[plcapi.git] / .travis.yml
1 # NB: we need to use the Trusty images if we want to test on hhvm
2 #dist: trusty
3
4 language: php
5
6 php:
7   - 5.3
8   - 5.4
9   - 5.5
10   - 5.6
11   - 7.0
12   - 7.1
13   #- hhvm
14
15 before_install:
16   # This is mandatory or the 'apt-get install' calls following will fail
17   - sudo apt-get update -qq
18   - sudo apt-get install -y apache2 libapache2-mod-fastcgi
19   - sudo apt-get install -y privoxy
20
21 install:
22   # NB: the lib does not declare dependencies for now...
23   - composer self-update && composer install
24
25 before_script:
26   # Disable xdebug. NB: this should NOT be done for hhvm...
27   - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpenv config-rm xdebug.ini; fi
28
29
30   # Set up Apache and Privoxy instances inside the Travis VM and use them for testing against
31   - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then ./test/ci/travis/setup_php_fpm.sh; ./test/ci/travis/setup_apache.sh; fi
32   - if [ "$TRAVIS_PHP_VERSION" = "hhvm" ]; then ./test/ci/travis/setup_hhvm.sh; ./test/ci/travis/setup_apache_hhvm.sh; fi
33   - ./test/ci/travis/setup_privoxy.sh
34
35 script:
36   # Travis currently compiles PHP with an oldish cURL/GnuTLS combination;
37   # to make the tests pass when Apache has a bogus SSL cert whe need the full set of options below
38   php -d "include_path=.:./lib:./test" test/testsuite.php LOCALSERVER=localhost URI=/demo/server/server.php HTTPSSERVER=localhost HTTPSURI=/demo/server/server.php PROXY=localhost:8080 HTTPSVERIFYHOST=0 HTTPSIGNOREPEER=1 SSLVERSION=3
39
40 after_failure:
41   # Save as much info as we can to help developers
42   - cat apache_error.log
43   - cat apache_access.log
44   - php -i