Fix ArrayIterator interface implementation; remove usage of arraysize(), structsize...
[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   # This is mandatory or the 'apt-get install' calls following will fail
13   - sudo apt-get update -qq
14   - sudo apt-get install -y apache2 libapache2-mod-fastcgi
15   - sudo apt-get install -y privoxy
16
17 install:
18   - composer self-update && composer install
19
20 before_script:
21   # Disable xdebug for speed.
22   # NB: this should NOT be done for hhvm and php 7.0.
23   # Also we use the php 5.6 run to generate code coverage reports, and we need xdebug for that
24   - if [ "$TRAVIS_PHP_VERSION" != "hhvm" -a "$TRAVIS_PHP_VERSION" != "7.0" -a "$TRAVIS_PHP_VERSION" != "5.6" ]; then phpenv config-rm xdebug.ini; fi
25
26   # Set up Apache and Privoxy instances inside the Travis VM and use them for testing against
27   - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then ./tests/ci/travis/setup_php_fpm.sh; ./tests/ci/travis/setup_apache.sh; fi
28   - if [ "$TRAVIS_PHP_VERSION" = "hhvm" ]; then ./tests/ci/travis/setup_hhvm.sh; ./tests/ci/travis/setup_apache_hhvm.sh; fi
29   - ./tests/ci/travis/setup_privoxy.sh
30
31 script:
32   # Travis currently compiles PHP with an oldish cURL/GnuTLS combination;
33   # to make the tests pass when Apache has a bogus SSL cert whe need the full set of options below
34   vendor/bin/phpunit --coverage-clover=coverage.clover tests LOCALSERVER=localhost URI=/demo/server/server.php HTTPSSERVER=localhost HTTPSURI=/demo/server/server.php PROXY=localhost:8080 HTTPSVERIFYHOST=0 HTTPSIGNOREPEER=1 SSLVERSION=3 DEBUG=1
35
36 after_failure:
37   # Save as much info as we can to help developers
38   - cat apache_error.log
39   - cat apache_access.log
40   - cat /var/log/hhvm/error.log
41   - if [ "$TRAVIS_PHP_VERSION" = "hhvm" ]; then php -i; fi
42
43 after_script:
44   # Upload code-coverage to Scrutinizer
45   - if [ "$TRAVIS_PHP_VERSION" = "5.6" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
46   - if [ "$TRAVIS_PHP_VERSION" = "5.6" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
47   # Upload code-coverage CodeClimate
48   - if [ "$TRAVIS_PHP_VERSION" = "5.6" ]; then CODECLIMATE_REPO_TOKEN=7fa6ee01e345090e059e5e42f3bfbcc8692feb8340396382dd76390a3019ac13 ./vendor/bin/test-reporter --coverage-report=coverage.clover; fi