7 runs-on: ${{ matrix.operating-system }}
10 URI: /demo/server/server.php
11 HTTPSSERVER: localhost
12 HTTPSURI: /demo/server/server.php
13 PROXYSERVER: localhost:8080
14 # Travis currently compiles PHP with an oldish cURL/GnuTLS combination;
15 # to make the tests pass when Apache has a bogus SSL cert whe need the full set of options below
23 operating-system: ['ubuntu-latest'] # @todo add 'windows-latest'
24 # @todo use an older version of phpunit to enable testing on php 5.3 - 5.5
25 php: ['8.1', '8.0', '7.4', '7.3', '7.2', '7.1', '7.0', '5.6']
28 uses: shivammathur/setup-php@v2
30 php-version: ${{ matrix.php }}
31 extensions: curl, dom, mbstring, xsl
32 ini-values: 'cgi.fix_pathinfo=1, always_populate_raw_post_data=-1'
33 #tools: phpunit/phpunit:a_version_compatible_with_php_5.3-5.5
34 # NB: this disables xdebug completely
37 # run: 'php -v && env'
39 uses: actions/checkout@v2
41 # @todo add config setup scripts for windows
42 run: 'chmod 755 ./tests/ci/setup/*.sh && sudo ./tests/ci/setup/setup_perl.sh && sudo ./tests/ci/setup/setup_apache.sh && sudo ./tests/ci/setup/setup_privoxy.sh'
43 # Avoid downloading composer deps on every workflow. Is this useful for us?
45 # uses: actions/cache@v2
47 # path: /tmp/composer-cache
48 # key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
50 # simpler alternative ? Atm, php-actions/composer also fails because of missing php xsl extension!
51 #uses: php-actions/composer@v6
52 run: 'composer install'
54 if: ${{ matrix.php == '7.4' }}
55 run: './tests/ci/setup/setup_code_coverage.sh enable'
57 # @todo bring back $PHPUNIT_OPTS to trigger code coverage
58 run: './vendor/bin/phpunit -v tests'
60 run: 'python3 demo/client/python/test.py'
62 run: 'perl demo/client/perl/test.pl'
65 run: 'systemctl status apache2.service; ls -la /etc/apache2/mods-enabled; ls -la /etc/apache2/conf-enabled; sudo cat /var/log/apache2/error.log; sudo cat /var/log/apache2/other_vhosts_access.log'
66 #run: 'env; php -i; sudo cat /var/log/privoxy/*; sudo cat /var/log/php*.log'