|
1 | 1 | name: PHPUnit Tests |
| 2 | +run-name: PHPUnit Tests${{ ( github.event_name == 'schedule' || ( github.event_name == 'pull_request' && contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) ) && ' (full matrix)' || '' }} |
2 | 3 |
|
3 | 4 | on: |
4 | 5 | push: |
|
11 | 12 | - trunk |
12 | 13 | - '3.[7-9]' |
13 | 14 | - '[4-9].[0-9]' |
| 15 | + # Keep these paths in sync with phpunit-tests-full-matrix.yml. |
14 | 16 | paths: |
15 | 17 | - '**' |
16 | 18 | # Documentation and repository metadata. |
|
45 | 47 | - 'tools/webpack/**' |
46 | 48 | - 'phpunit.xml.dist' |
47 | 49 | - '.github/workflows/phpunit-tests.yml' |
| 50 | + - '.github/workflows/phpunit-tests-full-matrix.yml' |
48 | 51 | - '.github/workflows/reusable-phpunit-tests-*.yml' |
49 | 52 | - '.github/workflows/reusable-prepare-gutenberg.yml' |
50 | 53 | workflow_dispatch: |
| 54 | + workflow_call: |
| 55 | + secrets: |
| 56 | + CODEVITALS_PROJECT_TOKEN: |
| 57 | + required: false |
| 58 | + CODECOV_TOKEN: |
| 59 | + required: false |
| 60 | + WPT_REPORT_API_KEY: |
| 61 | + required: false |
| 62 | + SLACK_GHA_SUCCESS_WEBHOOK: |
| 63 | + required: false |
| 64 | + SLACK_GHA_CANCELLED_WEBHOOK: |
| 65 | + required: false |
| 66 | + SLACK_GHA_FIXED_WEBHOOK: |
| 67 | + required: false |
| 68 | + SLACK_GHA_FAILURE_WEBHOOK: |
| 69 | + required: false |
51 | 70 | # Once weekly On Sundays at 00:00 UTC. |
52 | 71 | schedule: |
53 | 72 | - cron: '0 0 * * 0' |
@@ -110,11 +129,11 @@ jobs: |
110 | 129 | fail-fast: false |
111 | 130 | matrix: |
112 | 131 | os: [ ubuntu-24.04 ] |
113 | | - # The scheduled run tests every supported PHP version. Other events test the highest and lowest of each major. |
114 | | - php: ${{ github.event_name == 'schedule' && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} |
| 132 | + # Scheduled and labeled runs test every supported PHP version. Other runs test the highest and lowest of each major. |
| 133 | + php: ${{ ( github.event_name == 'schedule' || ( github.event_name == 'pull_request' && contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) ) && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} |
115 | 134 | db-type: [ 'mysql' ] |
116 | | - # The scheduled run tests the full database matrix. Other events retain MySQL 5.7 compatibility and the widely used 8.x releases. |
117 | | - db-version: ${{ github.event_name == 'schedule' && fromJSON('["5.7","8.0","8.4","9.7"]') || fromJSON('["5.7","8.0","8.4"]') }} |
| 135 | + # Scheduled and labeled runs test the full database matrix. Other runs retain MySQL 5.7 compatibility and the widely used 8.x releases. |
| 136 | + db-version: ${{ ( github.event_name == 'schedule' || ( github.event_name == 'pull_request' && contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) ) && fromJSON('["5.7","8.0","8.4","9.7"]') || fromJSON('["5.7","8.0","8.4"]') }} |
118 | 137 | tests-domain: [ 'example.org' ] |
119 | 138 | multisite: [ false, true ] |
120 | 139 | memcached: [ false ] |
@@ -174,8 +193,8 @@ jobs: |
174 | 193 | # |
175 | 194 | # Creates a PHPUnit test job for each PHP/MariaDB combination. |
176 | 195 | # |
177 | | - # The scheduled run tests all LTS versions of MariaDB supported by WordPress with greater than 1% usage according to |
178 | | - # w.org/stats. The exceptions to this rule are the most recent LTS and version 5.5. |
| 196 | + # Scheduled and labeled runs test all LTS versions of MariaDB supported by WordPress with greater than 1% usage |
| 197 | + # according to w.org/stats. The exceptions to this rule are the most recent LTS and version 5.5. |
179 | 198 | # |
180 | 199 | # The 5.5 release was intended as a drop-in replacement for MySQL. Because the MySQL 5.5 Docker containers do not |
181 | 200 | # work, this ensures some level of MySQL 5.5 testing. |
@@ -203,11 +222,11 @@ jobs: |
203 | 222 | fail-fast: false |
204 | 223 | matrix: |
205 | 224 | os: [ ubuntu-24.04 ] |
206 | | - # The scheduled run tests every supported PHP version. Other events test the highest and lowest of each major. |
207 | | - php: ${{ github.event_name == 'schedule' && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} |
| 225 | + # Scheduled and labeled runs test every supported PHP version. Other runs test the highest and lowest of each major. |
| 226 | + php: ${{ ( github.event_name == 'schedule' || ( github.event_name == 'pull_request' && contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) ) && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} |
208 | 227 | db-type: [ 'mariadb' ] |
209 | | - # The scheduled run tests the full database matrix. Other events retain MariaDB 5.5 compatibility, 10.6, and newer LTS releases. |
210 | | - db-version: ${{ github.event_name == 'schedule' && fromJSON('["5.5","10.3","10.5","10.6","10.11","11.4","11.8"]') || fromJSON('["5.5","10.6","10.11","11.4","11.8"]') }} |
| 228 | + # Scheduled and labeled runs test the full database matrix. Other runs retain MariaDB 5.5 compatibility, 10.6, and newer LTS releases. |
| 229 | + db-version: ${{ ( github.event_name == 'schedule' || ( github.event_name == 'pull_request' && contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) ) && fromJSON('["5.5","10.3","10.5","10.6","10.11","11.4","11.8"]') || fromJSON('["5.5","10.6","10.11","11.4","11.8"]') }} |
211 | 230 | multisite: [ false, true ] |
212 | 231 | memcached: [ false ] |
213 | 232 |
|
@@ -271,8 +290,8 @@ jobs: |
271 | 290 | fail-fast: false |
272 | 291 | matrix: |
273 | 292 | os: [ ubuntu-24.04 ] |
274 | | - # The scheduled run tests every supported PHP version. Other events test the highest and lowest of each major. |
275 | | - php: ${{ github.event_name == 'schedule' && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} |
| 293 | + # Scheduled and labeled runs test every supported PHP version. Other runs test the highest and lowest of each major. |
| 294 | + php: ${{ ( github.event_name == 'schedule' || ( github.event_name == 'pull_request' && contains( github.event.pull_request.labels.*.name, 'Full PHPUnit Matrix' ) ) ) && fromJSON('["7.4","8.0","8.1","8.2","8.3","8.4","8.5"]') || fromJSON('["7.4","8.0","8.5"]') }} |
276 | 295 | db-type: [ 'mysql', 'mariadb' ] |
277 | 296 | db-version: [ '12.1' ] |
278 | 297 | multisite: [ false, true ] |
|
0 commit comments