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.
16 # @todo check: is this necessary as well on GHA runners?
24 operating-system: ['ubuntu-latest'] # @todo add 'windows-latest'
25 # @todo use an older version of phpunit to enable testing on php 5.3 - 5.5
26 php: ['8.1', '8.0', '7.4', '7.3', '7.2', '7.1', '7.0', '5.6']
29 uses: actions/checkout@v2
30 # Although this action is useful, we prefer to use the same script to set up php that we use for the
31 # docker image used for local testing. This allows us to make sure that script is always in good shape
33 # uses: shivammathur/setup-php@v2
35 # php-version: ${{ matrix.php }}
36 # extensions: curl, dom, mbstring, xsl
37 # ini-values: 'cgi.fix_pathinfo=1, always_populate_raw_post_data=-1'
38 # #tools: phpunit/phpunit:a_version_compatible_with_php_5.3-5.5
39 # # NB: this disables xdebug completely
42 # @todo add config setup scripts for windows
44 chmod 755 ./tests/ci/setup/*.sh
45 sudo --preserve-env=GITHUB_ACTIONS ./tests/ci/setup/setup_perl.sh
46 sudo --preserve-env=GITHUB_ACTIONS ./tests/ci/setup/setup_apache.sh
47 sudo --preserve-env=GITHUB_ACTIONS ./tests/ci/setup/setup_privoxy.sh
48 sudo --preserve-env=GITHUB_ACTIONS ./tests/ci/setup/setup_php.sh ${{ matrix.php }}
49 sudo --preserve-env=GITHUB_ACTIONS ./tests/ci/setup/setup_composer.sh
50 # Avoid downloading composer deps on every workflow. Is this useful/working for us?
52 # uses: actions/cache@v2
54 # path: /tmp/composer-cache
55 # key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
57 run: 'composer install'
59 if: ${{ matrix.php == '7.4' }}
60 run: './tests/ci/setup/setup_code_coverage.sh enable'
62 # @todo bring back $PHPUNIT_OPTS to trigger code coverage
63 run: './vendor/bin/phpunit -v tests'
65 run: 'python3 demo/client/python/test.py'
67 run: 'perl demo/client/perl/test.pl'
74 dpkg --list | grep php
78 #systemctl status apache2.service
79 #ls -la /etc/apache2/mods-enabled
80 #ls -la /etc/apache2/conf-enabled
81 #ls -la /etc/apache2/mods-available
82 #ls -la /etc/apache2/conf-available
83 #ls -la /etc/apache2/sites-available/
84 #sudo cat /etc/apache2/envvars
85 #sudo cat /etc/apache2/sites-available/000-default.conf
87 ls -ltr /var/log/apache2
88 sudo cat /var/log/privoxy/*
89 sudo cat /var/log/apache2/error.log
90 sudo cat /var/log/apache2/other_vhosts_access.log
91 sudo cat /var/log/php*.log