@@ -58,11 +58,52 @@ concurrency:
5858
5959jobs :
6060 PHP :
61+ name : PHP (UnitTests, ${{ matrix.environment.php }}, ${{ matrix.environment.adapter }}, ${{ matrix.environment.mysql-engine }}, ${{ matrix.environment.mysql-version }})
6162 runs-on : ubuntu-24.04
6263 strategy :
6364 fail-fast : ${{ inputs.is_preview == true }}
6465 matrix :
65- type : [ 'UnitTests', 'SystemTestsPlugins', 'SystemTestsCore', 'IntegrationTestsCore', 'IntegrationTestsPlugins' ]
66+ environment :
67+ - php : ' 7.2'
68+ adapter : ' PDO_MYSQL'
69+ mysql-engine : ' Mysql'
70+ mysql-version : ' 5.7'
71+ - php : ' 8.2'
72+ adapter : ' PDO_MYSQL'
73+ mysql-engine : ' Mariadb'
74+ mysql-version : ' 11.4'
75+ - php : ' 8.5'
76+ adapter : ' MYSQLI'
77+ mysql-engine : ' Mysql'
78+ mysql-version : ' 8.0'
79+ steps :
80+ - uses : actions/checkout@v6
81+ with :
82+ lfs : false
83+ persist-credentials : false
84+ submodules : true
85+ path : matomo
86+ ref : ${{ inputs.ref || github.ref }}
87+ - name : running tests
88+ uses : matomo-org/github-action-tests@main
89+ with :
90+ test-type : ' UnitTests'
91+ mysql-driver : ${{ matrix.environment.adapter }}
92+ mysql-engine : ${{ matrix.environment.mysql-engine }}
93+ mysql-version : ${{ matrix.environment.mysql-version }}
94+ php-version : ${{ matrix.environment.php }}
95+ redis-service : true
96+ artifacts-pass : ${{ secrets.ARTIFACTS_PASS }}
97+ upload-artifacts : ${{ matrix.environment.php == '7.2' }}
98+ testomatio : ${{ secrets.TESTOMATIO_INTEGRATION }}
99+ testomatio-force-report : ${{ contains('schedule,push', github.event_name) && github.run_attempt < 2 }}
100+ PHP-extra :
101+ name : PHP (${{ matrix.type }}, ${{ matrix.environment.php }}, ${{ matrix.environment.adapter }}, ${{ matrix.environment.mysql-engine }}, ${{ matrix.environment.mysql-version }})
102+ runs-on : ubuntu-24.04
103+ strategy :
104+ fail-fast : ${{ inputs.is_preview == true }}
105+ matrix :
106+ type : [ 'SystemTestsPlugins', 'SystemTestsCore', 'IntegrationTestsCore', 'IntegrationTestsPlugins' ]
66107 environment :
67108 - php : ' 7.2'
68109 adapter : ' PDO_MYSQL'
@@ -156,3 +197,19 @@ jobs:
156197 artifacts-pass : ${{ secrets.ARTIFACTS_PASS }}
157198 upload-artifacts : true
158199 testomatio : ${{ secrets.TESTOMATIO }}
200+ ci-required :
201+ name : All required tests passed
202+ if : ${{ always() }}
203+ needs : [ PHP, Javascript, Client, UI ]
204+ runs-on : ubuntu-24.04
205+ steps :
206+ - name : Verify required jobs succeeded
207+ env :
208+ NEEDS_JSON : ${{ toJSON(needs) }}
209+ run : |
210+ echo "$NEEDS_JSON"
211+ if echo "$NEEDS_JSON" | grep -q '"result": "\(failure\|cancelled\|skipped\)"'; then
212+ echo "One or more required jobs did not succeed."
213+ exit 1
214+ fi
215+ echo "All required jobs passed."
0 commit comments