improve phpdocs in wrapper generated code
[plcapi.git] / .travis.yml
1 language: php
2
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...)
6 dist: xenial
7
8 env:
9     global:
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
17         - HTTPSVERIFYHOST=0
18         - HTTPSIGNOREPEER=1
19         - SSLVERSION=0
20         - DEBUG=0
21
22 php:
23   #- 5.3
24   #- 5.4
25   #- 5.5
26   - 5.6
27   - 7.0
28   - 7.1
29   - 7.2
30   - 7.3
31   - 7.4
32   - 8.0
33
34 before_install:
35   # @todo stop useless daemons to save memory: snapd, dockerd, ...
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_perl.sh
41   - sudo ./tests/ci/setup/setup_apache.sh
42   - sudo ./tests/ci/setup/setup_privoxy.sh
43   - ./tests/ci/setup/setup_php_travis.sh
44
45 install:
46   - composer install
47
48 before_script:
49   # Output what version of phpunit we got going
50   #- ./vendor/bin/phpunit --version
51   # Enable code coverage for a single version of php
52   - if [ "$TRAVIS_PHP_VERSION" = "7.4" ]; then ./tests/ci/setup/setup_code_coverage.sh enable && export PHPUNIT_OPTS="--coverage-clover=coverage.clover"; fi
53
54 script:
55     - ./vendor/bin/phpunit -v $PHPUNIT_OPTS tests
56     - python3 demo/client/python/test.py
57     - perl demo/client/perl/test.pl
58
59 after_failure:
60   # Troubleshoot test env build problems
61   #- ps auxwww
62   #- 'sudo find /etc/php | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/"'
63   #- php -i
64   #- ls -la /run/php
65   #- ls -ltr /var/log
66   #- sudo ls -ltr /var/log/apache2
67   #- 'sudo find /etc/apache2 | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/"'
68
69   # Show as much info as we can to help developers
70   - sudo cat /var/log/privoxy/*
71   - sudo cat /var/log/apache2/error.log
72   - sudo cat /var/log/apache2/other_vhosts_access.log
73   - sudo cat /var/log/php*.log
74
75 after_script:
76   # Upload code-coverage to Scrutinizer
77   - if [ -f coverage.clover ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
78   # Upload code-coverage CodeClimate - disabled as it does not support php 8 atm
79   #- if [ -f coverage.clover ]; then CODECLIMATE_REPO_TOKEN=7fa6ee01e345090e059e5e42f3bfbcc8692feb8340396382dd76390a3019ac13 ./vendor/bin/test-reporter --coverage-report=coverage.clover; fi
80
81 # reduce depth (history) of git checkout
82 git:
83     depth: 1