1111
1212jobs :
1313 build_libs :
14- runs-on : ${{ matrix.os }}
14+ name : Build Go libs${{ matrix.arch }}
15+ runs-on : ubuntu-24.04${{ matrix.arch }}
1516 container :
1617 image : ghcr.io/aikidosec/firewall-php-build-libs:v1
1718 strategy :
1819 matrix :
19- os : [ ubuntu-24.04, ubuntu-24.04- arm ]
20+ arch : [ '', '- arm' ]
2021 fail-fast : false
2122
2223 steps :
@@ -78,12 +79,13 @@ jobs:
7879 ${{ github.workspace }}/build/aikido-request-processor.so
7980
8081 build_php_extension :
81- runs-on : ${{ matrix.os }}
82+ name : Build php${{ matrix.php_version }} extension${{ matrix.arch }}
83+ runs-on : ubuntu-24.04${{ matrix.arch }}
8284 container : ghcr.io/aikidosec/firewall-php-build-extension:${{ matrix.php_version }}-v1
8385 strategy :
8486 matrix :
8587 php_version : ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
86- os : [ ubuntu-24.04, ubuntu-24.04- arm ]
88+ arch : [ '', '- arm' ]
8789 fail-fast : false
8890
8991 steps :
@@ -133,12 +135,13 @@ jobs:
133135 ${{ github.workspace }}/tests/*.diff
134136
135137 build_rpm :
136- runs-on : ${{ matrix.os }}
138+ name : Build rpm${{ matrix.arch }}
139+ runs-on : ubuntu-24.04${{ matrix.arch }}
137140 container :
138141 image : quay.io/centos/centos:stream9
139142 strategy :
140143 matrix :
141- os : ['ubuntu-24.04 ', 'ubuntu-24.04 -arm']
144+ arch : ['', '-arm']
142145 fail-fast : false
143146 needs : [ build_libs, build_php_extension ]
144147 steps :
@@ -227,12 +230,13 @@ jobs:
227230 ~/rpmbuild/RPMS/${{ env.ARCH }}/${{ env.AIKIDO_ARTIFACT_RELEASE }}
228231
229232 build_deb :
230- runs-on : ${{ matrix.os }}
233+ name : Build deb${{ matrix.arch }}
234+ runs-on : ubuntu-24.04${{ matrix.arch }}
231235 container :
232236 image : ubuntu:22.04
233237 strategy :
234238 matrix :
235- os : [ ubuntu-24.04, ubuntu-24.04- arm ]
239+ arch : [ '', '- arm' ]
236240 fail-fast : false
237241 needs : [ build_rpm ]
238242 steps :
@@ -295,7 +299,8 @@ jobs:
295299 ${{ env.AIKIDO_ARTIFACT }}
296300
297301 test_php_centos :
298- runs-on : ${{ matrix.os }}
302+ name : CentOS php-${{ matrix.php_version }} ${{ matrix.server }}${{ matrix.arch }}
303+ runs-on : ubuntu-24.04${{ matrix.arch }}
299304 container :
300305 image : ghcr.io/aikidosec/firewall-php-test-centos:${{ matrix.php_version }}-v1
301306 options : --privileged
@@ -304,7 +309,7 @@ jobs:
304309 matrix :
305310 php_version : ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
306311 server : ['nginx-php-fpm', 'apache-mod-php', 'php-built-in']
307- os : ['ubuntu-24.04 ', 'ubuntu-24.04 -arm']
312+ arch : ['', '-arm']
308313 fail-fast : false
309314
310315 steps :
@@ -377,17 +382,18 @@ jobs:
377382 - name : Run ${{ matrix.server }} server tests
378383 run : |
379384 cd tools
380- python3 run_server_tests.py ../tests/server ../tests/testlib --server=${{ matrix.server }}
385+ python3 run_server_tests.py ../tests/server ../tests/testlib --server=${{ matrix.server }} --max-runs=3
381386
382387 test_php_ubuntu :
383- runs-on : ${{ matrix.os }}
388+ name : Ubuntu php-${{ matrix.php_version }} ${{ matrix.server }}${{ matrix.arch }}
389+ runs-on : ubuntu-24.04${{ matrix.arch }}
384390 container :
385391 image : ghcr.io/aikidosec/firewall-php-test-ubuntu:${{ matrix.php_version }}-v1
386392 options : --privileged
387393 needs : [ build_deb ]
388394 strategy :
389395 matrix :
390- os : ['ubuntu-24.04 ', 'ubuntu-24.04 -arm']
396+ arch : ['', '-arm']
391397 php_version : ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
392398 server : ['nginx-php-fpm', 'apache-mod-php', 'php-built-in']
393399 fail-fast : false
@@ -434,26 +440,17 @@ jobs:
434440 dpkg -i -E ${{ env.AIKIDO_DEB }}/${{ env.AIKIDO_DEB }}
435441
436442 - name : Run CLI tests
437- if : matrix.os == 'ubuntu-24.04' || matrix.os == 'ubuntu-24.04-arm'
438443 run : |
439444 php lib/php-extension/run-tests.php ./tests/cli
440445
441446 - name : Run ${{ matrix.server }} server tests
442447 run : |
448+ . /etc/apache2/envvars
443449 cd tools
444- python3 run_server_tests.py ../tests/server ../tests/testlib --server=${{ matrix.server }}
445-
446- - name : Archive test artifacts
447- uses : actions/upload-artifact@v4
448- if : always()
449- with :
450- name : test-results-aikido-${{ env.AIKIDO_VERSION }}-${{ matrix.os }}-php-${{ matrix.php_version }}
451- if-no-files-found : ignore
452- path : |
453- ${{ github.workspace }}/tests/cli/**/*.diff
450+ python3 run_server_tests.py ../tests/server ../tests/testlib --server=${{ matrix.server }} --max-runs=3
454451
455452 test_php_qa_action_controlling_tests_apache_mod_php :
456- name : Tests (apache2 - mod_php)
453+ name : QA apache-mod-php
457454 runs-on : ubuntu-latest
458455 needs : [ build_deb ]
459456 steps :
@@ -480,7 +477,7 @@ jobs:
480477 echo "#!/usr/bin/env bash" > ./zen-demo-php/.fly/scripts/aikido.sh
481478 echo "dpkg -i -E \"/var/www/html/aikido-php-firewall.\$(uname -i).deb\"" >> ./zen-demo-php/.fly/scripts/aikido.sh
482479 - name : Run Firewall QA Tests
483- uses : AikidoSec/firewall-tester-action@add-control-server-tests
480+ uses : AikidoSec/firewall-tester-action@releases/v1
484481 with :
485482 dockerfile_path : ./zen-demo-php/Dockerfile
486483 extra_args : ' --env-file=./zen-demo-php/.env.example -e APP_KEY=base64:W2v6u6VR4lURkxuMT9xZ6pdhXSt5rxsmWTbd1HGqlIM='
@@ -489,7 +486,7 @@ jobs:
489486 test_type : control
490487
491488 test_php_qa_action_controlling_tests_apache_php_fpm :
492- name : Tests (apache2 - php-fpm)
489+ name : QA apache- php-fpm
493490 runs-on : ubuntu-latest
494491 needs : [ build_deb ]
495492 steps :
@@ -516,7 +513,7 @@ jobs:
516513 echo "#!/usr/bin/env bash" > ./zen-demo-php/.fly/scripts/aikido.sh
517514 echo "dpkg -i -E \"/var/www/html/aikido-php-firewall.\$(uname -i).deb\"" >> ./zen-demo-php/.fly/scripts/aikido.sh
518515 - name : Run Firewall QA Tests
519- uses : AikidoSec/firewall-tester-action@add-control-server-tests
516+ uses : AikidoSec/firewall-tester-action@releases/v1
520517 with :
521518 dockerfile_path : ./zen-demo-php/Dockerfile
522519 extra_args : ' --env-file=./zen-demo-php/.env.example -e APP_KEY=base64:W2v6u6VR4lURkxuMT9xZ6pdhXSt5rxsmWTbd1HGqlIM='
@@ -525,7 +522,7 @@ jobs:
525522 test_type : control
526523
527524 test_php_qa_action_controlling_tests_nginx_php_fpm :
528- name : Tests ( nginx - php-fpm)
525+ name : QA nginx- php-fpm
529526 runs-on : ubuntu-latest
530527 needs : [ build_deb ]
531528 steps :
@@ -552,7 +549,7 @@ jobs:
552549 echo "#!/usr/bin/env bash" > ./zen-demo-php/.fly/scripts/aikido.sh
553550 echo "dpkg -i -E \"/var/www/html/aikido-php-firewall.\$(uname -i).deb\"" >> ./zen-demo-php/.fly/scripts/aikido.sh
554551 - name : Run Firewall QA Tests
555- uses : AikidoSec/firewall-tester-action@add-control-server-tests
552+ uses : AikidoSec/firewall-tester-action@releases/v1
556553 with :
557554 dockerfile_path : ./zen-demo-php/Dockerfile
558555 extra_args : ' --env-file=./zen-demo-php/.env.example -e APP_KEY=base64:W2v6u6VR4lURkxuMT9xZ6pdhXSt5rxsmWTbd1HGqlIM='
0 commit comments