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