From 444f105eba220aa353e6b2262aa1dc442f45a054 Mon Sep 17 00:00:00 2001 From: Vladimir Reznichenko Date: Mon, 15 Jul 2024 13:39:07 +0200 Subject: [PATCH] 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). --- .github/workflows/ci.yml | 2 +- .../changelog/dev-ci-core-e2e-tests-tweaks | 4 +++ plugins/woocommerce/package.json | 29 ++----------------- 3 files changed, 8 insertions(+), 27 deletions(-) create mode 100644 plugins/woocommerce/changelog/dev-ci-core-e2e-tests-tweaks diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0cfd9b6c4a3..2938587c8e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }}' diff --git a/plugins/woocommerce/changelog/dev-ci-core-e2e-tests-tweaks b/plugins/woocommerce/changelog/dev-ci-core-e2e-tests-tweaks new file mode 100644 index 00000000000..29c10d4f7e2 --- /dev/null +++ b/plugins/woocommerce/changelog/dev-ci-core-e2e-tests-tweaks @@ -0,0 +1,4 @@ +Significance: patch +Type: dev + +CI: Re-group PHPUnit jobs. diff --git a/plugins/woocommerce/package.json b/plugins/woocommerce/package.json index 86122e7d6aa..1bcb78bb062 100644 --- a/plugins/woocommerce/package.json +++ b/plugins/woocommerce/package.json @@ -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": [