CI: Re-group PHPUnit jobs. (#49443)

In this PR, we reduce build time for REST API tests (lightweight build) and regroup a bit of PHPUnit jobs (fewer jobs with the same coverage).
This commit is contained in:
Vladimir Reznichenko 2024-07-15 13:39:07 +02:00 committed by GitHub
parent 13d3e11d40
commit 444f105eba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 27 deletions

View File

@ -119,7 +119,7 @@ jobs:
with:
install: '${{ matrix.projectName }}...'
build: ${{ ( github.ref_type == 'tag' && 'false' ) || matrix.projectName }}
build-type: ${{ ( matrix.testType == 'unit:php' && 'backend' ) || 'full' }}
build-type: ${{ ( ( matrix.testType == 'unit:php' || matrix.testType == 'api' ) && 'backend' ) || 'full' }}
pull-playwright-cache: ${{ matrix.testEnv.shouldCreate && matrix.testType == 'e2e' }}
pull-package-deps: '${{ matrix.projectName }}'

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: Re-group PHPUnit jobs.

View File

@ -104,31 +104,7 @@
},
"tests": [
{
"name": "PHP",
"testType": "unit:php",
"command": "test:php:env",
"changes": [
"client/admin/config/*.json",
"composer.json",
"composer.lock",
"includes/**/*.php",
"patterns/**/*.php",
"src/**/*.php",
"templates/**/*.php",
"tests/php/**/*.php",
"tests/legacy/unit-tests/**/*.php",
"tests/unit-tests/**/*.php"
],
"testEnv": {
"start": "env:test"
},
"events": [
"pull_request",
"push"
]
},
{
"name": "PHP 8.0",
"name": "PHP: 8.0 WP: latest",
"testType": "unit:php",
"command": "test:php:env",
"changes": [
@ -146,7 +122,8 @@
"testEnv": {
"start": "env:test",
"config": {
"phpVersion": "8.0"
"phpVersion": "8.0",
"wpVersion": "latest"
}
},
"events": [