name: CI on: [push] jobs: test: runs-on: ubuntu-latest env: HTTPSERVER: localhost URI: /demo/server/server.php HTTPSSERVER: localhost HTTPSURI: /demo/server/server.php PROXYSERVER: localhost:8080 # Travis currently compiles PHP with an oldish cURL/GnuTLS combination; # to make the tests pass when Apache has a bogus SSL cert whe need the full set of options below HTTPSVERIFYHOST: 0 HTTPSIGNOREPEER: 1 SSLVERSION: 0 DEBUG: 0 strategy: fail-fast: false matrix: php: ['8.1', '8.0', '7.4', '7.3', '7.2', '7.1', '7.0', '5.6', '5.5', '5.4', '5.3'] steps: - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} extensions: curl #tools: phpunit #- # run: 'php -v && env' - uses: actions/checkout@v2 - 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' # Avoid downloading composer deps on every workflow. Is this useful for us? #- # uses: actions/cache@v2 # with: # path: /tmp/composer-cache # key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} - uses: php-actions/composer@v6 # simpler alternative ? #run: 'composer install' - if: ${{ matrix.php == '7.4' }} run: './tests/ci/setup/setup_code_coverage.sh enable' - # @todo bring back $PHPUNIT_OPTS run: './vendor/bin/phpunit -v tests' - run: 'python3 demo/client/python/test.py' - run: 'perl demo/client/perl/test.pl' - if: ${{ failure() }} run: 'systemctl status apache2.service; env; php -i; sudo cat /var/log/privoxy/*; sudo cat /var/log/apache2/error.log; sudo cat /var/log/apache2/other_vhosts_access.log; sudo cat /var/log/php*.log'