Skip to content

Commit 3671902

Browse files
swissspidyShyamGaddepbearnemukeshpanchal27felixarntz
authored
Merge pull request #1794 from WordPress/trunk
Co-authored-by: ShyamGadde <[email protected]> Co-authored-by: pbearne <[email protected]> Co-authored-by: mukeshpanchal27 <[email protected]> Co-authored-by: felixarntz <[email protected]> Co-authored-by: b1ink0 <[email protected]> Co-authored-by: westonruter <[email protected]> Co-authored-by: joemcgill <[email protected]> Co-authored-by: swissspidy <[email protected]>
2 parents aa340dc + b6e5c5a commit 3671902

File tree

101 files changed

+7597
-2999
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+7597
-2999
lines changed

.github/workflows/deploy-plugins.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ jobs:
6969
- name: Install npm dependencies
7070
run: npm ci
7171

72-
- name: Check plugin versions
73-
run: npm run versions -- --plugin=${{ matrix.plugin }}
74-
7572
- name: Build plugin
7673
run: npm run build:plugin:${{ matrix.plugin }}
7774

@@ -101,6 +98,10 @@ jobs:
10198
10299
echo "deploy=true" >> $GITHUB_OUTPUT
103100
101+
- name: Check plugin version integrity
102+
if: steps.check-deployment.outputs.deploy == 'true'
103+
run: npm run versions -- --plugin=${{ matrix.plugin }}
104+
104105
- name: Create zip file
105106
if: steps.check-deployment.outputs.deploy == 'true'
106107
run: |

.github/workflows/php-test-plugins.yml

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ jobs:
5050
- php: '8.3'
5151
wp: 'trunk'
5252
- php: '8.2'
53+
phpunit: '9.6'
5354
wp: 'latest'
54-
# coverage: true # TODO: Uncomment once coverage reports are fixed. See <https://github.com/WordPress/performance/pull/1586#issuecomment-2474498387>.
55+
coverage: true
5556
env:
5657
WP_ENV_PHP_VERSION: ${{ matrix.php }}
5758
WP_ENV_CORE: ${{ matrix.wp == 'trunk' && 'WordPress/WordPress' || format( 'https://wordpress.org/wordpress-{0}.zip', matrix.wp ) }}
@@ -68,20 +69,51 @@ jobs:
6869
- name: Build assets
6970
run: npm run build
7071
- name: Install WordPress
71-
run: npm run wp-env start
72+
run: |
73+
if [ "${{ matrix.coverage }}" == "true" ]; then
74+
npm run wp-env start -- --xdebug=coverage
75+
else
76+
npm run wp-env start
77+
fi
7278
- name: Composer Install
7379
run: npm run wp-env run tests-cli -- --env-cwd="wp-content/plugins/$(basename $(pwd))" composer install --no-interaction --no-progress
80+
- name: Update Composer Dependencies
81+
run: composer update --with-all-dependencies --no-interaction --no-progress
82+
- name: Install PHPUnit
83+
run: |
84+
if [ "${{ matrix.php }}" == "8.2" ]; then
85+
composer require phpunit/phpunit:${{ matrix.phpunit }} --with-all-dependencies --ignore-platform-reqs
86+
else
87+
composer require --dev phpunit/phpunit:${{ matrix.phpunit }}
88+
fi
89+
if: matrix.phpunit != ''
7490
- name: Running single site unit tests
7591
run: |
7692
if [ "${{ matrix.coverage }}" == "true" ]; then
77-
npm run test-php -- --coverage-clover=coverage-${{ github.sha }}.xml
93+
npm run test-php:performance-lab -- -- -- --coverage-clover=./single-site-reports/coverage-performance-lab.xml
94+
npm run test-php:auto-sizes -- -- -- --coverage-clover=./single-site-reports/coverage-auto-sizes.xml
95+
npm run test-php:dominant-color-images -- -- -- --coverage-clover=./single-site-reports/coverage-dominant-color-images.xml
96+
npm run test-php:embed-optimizer -- -- -- --coverage-clover=./single-site-reports/coverage-embed-optimizer.xml
97+
npm run test-php:image-prioritizer -- -- -- --coverage-clover=./single-site-reports/coverage-image-prioritizer.xml
98+
npm run test-php:optimization-detective -- -- -- --coverage-clover=./single-site-reports/coverage-optimization-detective.xml
99+
npm run test-php:speculation-rules -- -- -- --coverage-clover=./single-site-reports/coverage-speculation-rules.xml
100+
npm run test-php:web-worker-offloading -- -- -- --coverage-clover=./single-site-reports/coverage-web-worker-offloading.xml
101+
npm run test-php:webp-uploads -- -- -- --coverage-clover=./single-site-reports/coverage-webp-uploads.xml
78102
else
79103
npm run test-php
80104
fi
81105
- name: Running multisite unit tests
82106
run: |
83107
if [ "${{ matrix.coverage }}" == "true" ]; then
84-
npm run test-php-multisite -- --coverage-clover=coverage-multisite-${{ github.sha }}.xml
108+
npm run test-php-multisite:performance-lab -- -- -- --coverage-clover=./multisite-reports/coverage-multisite-performance-lab.xml
109+
npm run test-php-multisite:auto-sizes -- -- -- --coverage-clover=./multisite-reports/coverage-multisite-auto-sizes.xml
110+
npm run test-php-multisite:dominant-color-images -- -- -- --coverage-clover=./multisite-reports/coverage-multisite-dominant-color-images.xml
111+
npm run test-php-multisite:embed-optimizer -- -- -- --coverage-clover=./multisite-reports/coverage-multisite-embed-optimizer.xml
112+
npm run test-php-multisite:image-prioritizer -- -- -- --coverage-clover=./multisite-reports/coverage-multisite-image-prioritizer.xml
113+
npm run test-php-multisite:optimization-detective -- -- -- --coverage-clover=./multisite-reports/coverage-multisite-optimization-detective.xml
114+
npm run test-php-multisite:speculation-rules -- -- -- --coverage-clover=./multisite-reports/coverage-multisite-speculation-rules.xml
115+
npm run test-php-multisite:web-worker-offloading -- -- -- --coverage-clover=./multisite-reports/coverage-multisite-web-worker-offloading.xml
116+
npm run test-php-multisite:webp-uploads -- -- -- --coverage-clover=./multisite-reports/coverage-multisite-webp-uploads.xml
85117
else
86118
npm run test-php-multisite
87119
fi
@@ -90,7 +122,7 @@ jobs:
90122
uses: codecov/codecov-action@v5
91123
with:
92124
token: ${{ secrets.CODECOV_TOKEN }}
93-
files: coverage-${{ github.sha }}.xml
125+
directory: ./single-site-reports
94126
flags: single
95127
name: ${{ matrix.php }}-single-site-coverage
96128
fail_ci_if_error: true
@@ -99,7 +131,7 @@ jobs:
99131
uses: codecov/codecov-action@v5
100132
with:
101133
token: ${{ secrets.CODECOV_TOKEN }}
102-
files: coverage-multisite-${{ github.sha }}.xml
134+
directory: ./multisite-reports
103135
flags: multisite
104136
name: ${{ matrix.php }}-multisite-coverage
105137
fail_ci_if_error: true

0 commit comments

Comments
 (0)