Nth time is a charm?
[plcapi.git] / .travis.yml
index da4e646..ecb7e35 100644 (file)
@@ -12,22 +12,29 @@ before_install:
   - sudo apt-get update -qq
 
 install:
-  - composer self-update && composer install
   - sudo apt-get install -y apache2 libapache2-mod-fastcgi
+  - sudo apt-get install -y privoxy
+  - composer self-update && composer install
 
 before_script:
   # Disable xdebug. NB: this should NOT be done for hhvm...
-  - if [ $TRAVIS_PHP_VERSION != "hhvm" -a $TRAVIS_PHP_VERSION != "7.0" ]; then phpenv config-rm xdebug.ini; fi
+  - if [ "$TRAVIS_PHP_VERSION" != "hhvm" -a "$TRAVIS_PHP_VERSION" != "7.0" ]; then phpenv config-rm xdebug.ini; fi
 
   # We set up an Apache instance inside the Travis VM and test it.
-  - sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then ./.travis/install_apache.sh; fi"
-  - sh -c "if [ '$TRAVIS_PHP_VERSION' = 'hhvm' ]; then ./.travis/install_apache_hhvm.sh; fi"
+  - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then ./tests/ci/travis/setup_apache.sh; fi
+  - if [ "$TRAVIS_PHP_VERSION" = "hhvm" ]; then ./tests/ci/travis/setup_apache_hhvm.sh; fi
+  - ./tests/ci/travis/setup_privoxy.sh
 
 script:
   # to have code coverage: --coverage-clover=coverage.clover
-  phpunit tests LOCALSERVER=localhost URI=/demo/server/server.php HTTPSSERVER=gggeek.ssl.altervista.org HTTPSURI=/sw/xmlrpc/demo/server/server.php NOPROXY=1
+  phpunit tests LOCALSERVER=localhost URI=/demo/server/server.php HTTPSSERVER=localhost HTTPSURI=/demo/server/server.php PROXY=localhost:8080 HTTPSVERIFYHOST=0 HTTPSIGNOREPEER=1 SSLVERSION=3
+
+after_failure:
+  - cat apache_error.log
+  - cat apache_access.log
+  - php -i
 
-#after_script:
+after_script:
 #  # upload code-coverage to Scrutinizer
 #  - wget https://scrutinizer-ci.com/ocular.phar
 #  - php ocular.phar code-coverage:upload --format=php-clover coverage.clover