Skip to content

Commit 466eb25

Browse files
Sarthak JaiswalSarthak Jaiswal
authored andcommitted
Update PHPUnit version for specific php version
1 parent 83b2117 commit 466eb25

File tree

2 files changed

+41
-8
lines changed

2 files changed

+41
-8
lines changed

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

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ jobs:
4949
wp: '6.5'
5050
- php: '8.3'
5151
wp: 'trunk'
52+
phpunit: '9.6'
5253
- php: '8.2'
54+
phpunit: '9.6'
5355
wp: 'latest'
5456
coverage: true
5557
env:
@@ -74,25 +76,48 @@ jobs:
7476
- name: Running single site unit tests
7577
run: |
7678
if [ "${{ matrix.coverage }}" == "true" ]; then
77-
npm run test-php -- -- -- --coverage-clover=coverage-${{ github.sha }}.xml
79+
npm run test-php:performance-lab -- -- -- --coverage-clover=coverage-performance-lab-${{ github.sha }}.xml
80+
npm run test-php:auto-sizes -- -- -- --coverage-clover=coverage-auto-sizes-${{ github.sha }}.xml
81+
npm run test-php:dominant-color-images -- -- -- --coverage-clover=coverage-dominant-color-images-${{ github.sha }}.xml
82+
npm run test-php:embed-optimizer -- -- -- --coverage-clover=coverage-embed-optimizer-${{ github.sha }}.xml
83+
npm run test-php:image-prioritizer -- -- -- --coverage-clover=coverage-image-prioritizer-${{ github.sha }}.xml
84+
npm run test-php:optimization-detective -- -- -- --coverage-clover=coverage-optimization-detective-${{ github.sha }}.xml
85+
npm run test-php:speculation-rules -- -- -- --coverage-clover=coverage-speculation-rules-${{ github.sha }}.xml
86+
npm run test-php:web-worker-offloading -- -- -- --coverage-clover=coverage-web-worker-offloading-${{ github.sha }}.xml
87+
npm run test-php:webp-uploads -- -- -- --coverage-clover=coverage-webp-uploads-${{ github.sha }}.xml
7888
else
7989
npm run test-php
8090
fi
8191
- name: Running multisite unit tests
8292
run: |
8393
if [ "${{ matrix.coverage }}" == "true" ]; then
84-
npm run test-php-multisite -- -- --coverage-clover=coverage-multisite-${{ github.sha }}.xml
94+
npm run test-php-multisite:performance-lab -- -- -- --coverage-clover=coverage-multisite-performance-lab-${{ github.sha }}.xml
95+
npm run test-php-multisite:auto-sizes -- -- -- --coverage-clover=coverage-multisite-auto-sizes-${{ github.sha }}.xml
96+
npm run test-php-multisite:dominant-color-images -- -- -- --coverage-clover=coverage-multisite-dominant-color-images-${{ github.sha }}.xml
97+
npm run test-php-multisite:embed-optimizer -- -- -- --coverage-clover=coverage-multisite-embed-optimizer-${{ github.sha }}.xml
98+
npm run test-php-multisite:image-prioritizer -- -- -- --coverage-clover=coverage-multisite-image-prioritizer-${{ github.sha }}.xml
99+
npm run test-php-multisite:optimization-detective -- -- -- --coverage-clover=coverage-multisite-optimization-detective-${{ github.sha }}.xml
100+
npm run test-php-multisite:speculation-rules -- -- -- --coverage-clover=coverage-multisite-speculation-rules-${{ github.sha }}.xml
101+
npm run test-php-multisite:web-worker-offloading -- -- -- --coverage-clover=coverage-multisite-web-worker-offloading-${{ github.sha }}.xml
102+
npm run test-php-multisite:webp-uploads -- -- -- --coverage-clover=coverage-multisite-webp-uploads-${{ github.sha }}.xml
85103
else
86104
npm run test-php-multisite
87105
fi
88-
- name: List coverage files
89-
run: ls -la
90106
- name: Upload single site coverage reports to Codecov
91107
if: ${{ matrix.coverage == true }}
92108
uses: codecov/codecov-action@v4
93109
with:
94110
token: ${{ secrets.CODECOV_TOKEN }}
95-
file: ./coverage-${{ github.sha }}.xml
111+
files: |
112+
coverage-performance-lab-${{ github.sha }}.xml
113+
coverage-auto-sizes-${{ github.sha }}.xml
114+
coverage-dominant-color-images-${{ github.sha }}.xml
115+
coverage-embed-optimizer-${{ github.sha }}.xml
116+
coverage-image-prioritizer-${{ github.sha }}.xml
117+
coverage-optimization-detective-${{ github.sha }}.xml
118+
coverage-speculation-rules-${{ github.sha }}.xml
119+
coverage-web-worker-offloading-${{ github.sha }}.xml
120+
coverage-webp-uploads-${{ github.sha }}.xml
96121
flags: single
97122
name: ${{ matrix.php }}-single-site-coverage
98123
fail_ci_if_error: true
@@ -101,7 +126,16 @@ jobs:
101126
uses: codecov/codecov-action@v4
102127
with:
103128
token: ${{ secrets.CODECOV_TOKEN }}
104-
files: ./coverage-multisite-${{ github.sha }}.xml
129+
files: |
130+
coverage-multisite-performance-lab-${{ github.sha }}.xml
131+
coverage-multisite-auto-sizes-${{ github.sha }}.xml
132+
coverage-multisite-dominant-color-images-${{ github.sha }}.xml
133+
coverage-multisite-embed-optimizer-${{ github.sha }}.xml
134+
coverage-multisite-image-prioritizer-${{ github.sha }}.xml
135+
coverage-multisite-optimization-detective-${{ github.sha }}.xml
136+
coverage-multisite-speculation-rules-${{ github.sha }}.xml
137+
coverage-multisite-web-worker-offloading-${{ github.sha }}.xml
138+
coverage-multisite-webp-uploads-${{ github.sha }}.xml
105139
flags: multisite
106140
name: ${{ matrix.php }}-multisite-coverage
107141
fail_ci_if_error: true

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
"wp-phpunit/wp-phpunit": "^6.5",
3333
"yoast/phpunit-polyfills": "^2.0",
3434
"phpstan/php-8-stubs": "^0.4.0",
35-
"phpstan/phpstan-strict-rules": "^1.6",
36-
"phpunit/phpunit": "^9"
35+
"phpstan/phpstan-strict-rules": "^1.6"
3736
},
3837
"config": {
3938
"allow-plugins": {

0 commit comments

Comments
 (0)