3 # As of May 2019, Travis is deprecating VMs based on Precise, which means that we can only test on php >= 5.6 going forward
4 # (nb: this is not necessarily true yet - and we can use a different base for each php version, but we'll have to
5 # adapt composer.json plus the apache / env setup scripts to accommodate that...)
10 - HTTPSERVER=localhost
11 - URI=/demo/server/server.php
12 - HTTPSSERVER=localhost
13 - HTTPSURI=/demo/server/server.php
14 - PROXYSERVER=localhost:8080
15 # Travis currently compiles PHP with an oldish cURL/GnuTLS combination;
16 # to make the tests pass when Apache has a bogus SSL cert whe need the full set of options below
35 # @todo stop useless daemons to save memory: snapd, docker, ...
36 # This is mandatory or the 'apt-get install' calls following will fail
37 - sudo apt-get update -qq
38 # Just in case there are git misconfigurations: make sure scripts are executable
39 - sudo chmod 755 ./tests/ci/setup/*.sh
40 - sudo ./tests/ci/setup/setup_apache.sh
41 - sudo ./tests/ci/setup/setup_privoxy.sh
42 - ./tests/ci/setup/setup_php_travis.sh
48 # Output what version of phpunit we got going
49 - ./vendor/bin/phpunit --version
52 ./vendor/bin/phpunit $COVERAGE_OPTS tests
58 #- 'sudo find /etc/php | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/"'
61 #- sudo ls -ltr /var/log
62 #- sudo ls -ltr /var/log/apache2
63 #- 'sudo find /etc/apache2 | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/"'
65 # Show as much info as we can to help developers
66 - sudo cat /var/log/privoxy.log
67 - cat apache_error.log
68 - cat apache_access.log
69 - sudo cat /var/log/php*.log
72 # Upload code-coverage to Scrutinizer
73 - if [ -f coverage.clover ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
74 # Upload code-coverage CodeClimate - disabled as it does not support php 8 atm
75 #- if [ -f coverage.clover ]; then CODECLIMATE_REPO_TOKEN=7fa6ee01e345090e059e5e42f3bfbcc8692feb8340396382dd76390a3019ac13 ./vendor/bin/test-reporter --coverage-report=coverage.clover; fi
77 # reduce depth (history) of git checkout