One more travis https test
[plcapi.git] / .travis.yml
1 language: php
2
3 php:
4   - 5.3
5   - 5.4
6   - 5.5
7   - 5.6
8   - 7.0
9   - hhvm
10
11 before_install:
12   - sudo apt-get update -qq
13
14 install:
15   - sudo apt-get install -y apache2 libapache2-mod-fastcgi
16   - sudo apt-get install -y privoxy
17   - composer self-update && composer install
18
19 before_script:
20   # Disable xdebug. NB: this should NOT be done for hhvm...
21   - if [ "$TRAVIS_PHP_VERSION" != "hhvm" -a "$TRAVIS_PHP_VERSION" != "7.0" ]; then phpenv config-rm xdebug.ini; fi
22
23   # We set up an Apache instance inside the Travis VM and test it.
24   - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then ./tests/ci/travis/setup_apache.sh; fi
25   - if [ "$TRAVIS_PHP_VERSION" = "hhvm" ]; then ./tests/ci/travis/setup_apache_hhvm.sh; fi
26   - ./tests/ci/travis/setup_privoxy.sh
27
28 script:
29   # to have code coverage: --coverage-clover=coverage.clover
30   phpunit tests LOCALSERVER=localhost URI=/demo/server/server.php HTTPSSERVER=localhost HTTPSURI=/demo/server/server.php PROXY=localhost:8080 HTTPSIGNOREPEER=1
31
32 after_failure:
33   - cat apache_error.log
34   - cat apache_access.log
35   - cat /etc/ssl/certs/ssl-cert-snakeoil.pem
36
37 after_script:
38 #  # upload code-coverage to Scrutinizer
39 #  - wget https://scrutinizer-ci.com/ocular.phar
40 #  - php ocular.phar code-coverage:upload --format=php-clover coverage.clover