Skip to content

Commit 8fef07e

Browse files
committed
more fixes
1 parent ffcdfa1 commit 8fef07e

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

.github/workflows/testing.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,35 +30,35 @@ jobs:
3030
{
3131
"include": [
3232
{
33-
"php": "8.4",
33+
"php": 8.4,
3434
"wp": "latest",
3535
"mysql": "mysql-8.0"
3636
},
3737
{
38-
"php": "8.4",
38+
"php": 8.4,
3939
"wp": "latest",
4040
"dbtype": "sqlite"
4141
},
4242
{
43-
"php": "8.4",
43+
"php": 8.4,
4444
"wp": "latest",
4545
"mysql": "mysql-8.0",
4646
"os": "macos-15"
4747
},
4848
{
49-
"php": "8.4",
49+
"php": 8.4,
5050
"wp": "latest",
5151
"dbtype": "sqlite",
5252
"os": "macos-15"
5353
},
5454
{
55-
"php": "8.4",
55+
"php": 8.4,
5656
"wp": "latest",
5757
"mysql": "mysql-8.0",
5858
"os": "windows-2025"
5959
},
6060
{
61-
"php": "8.4",
61+
"php": 8.4,
6262
"wp": "latest",
6363
"dbtype": "sqlite",
6464
"os": "windows-2025"
@@ -154,27 +154,25 @@ jobs:
154154
# Bust the cache at least once a month - output format: YYYY-MM.
155155
custom-cache-suffix: $(date -u "+%Y-%m")
156156

157-
- name: Grab PHPUnit version
158-
id: phpunit_version
159-
run: echo "VERSION=$(vendor/bin/phpunit --version | grep --only-matching --max-count=1 --extended-regexp '\b[0-9]+\.[0-9]+')" >> $GITHUB_OUTPUT
160-
161157
# PHPUnit 10+ may fail a test run when the "old" configuration format is used.
162158
# Luckily, there is a build-in migration tool since PHPUnit 9.3.
163159
- name: Migrate PHPUnit configuration for PHPUnit 10+
164-
if: ${{ startsWith( steps.phpunit_version.outputs.VERSION, '1' ) }}
160+
if: ${{ matrix.php >= 8.2 || matrix.php == 'nightly' }}
165161
continue-on-error: true
166162
run: composer phpunit -- --migrate-configuration
167163

168164
- name: Setup problem matcher to provide annotations for PHPUnit
169165
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
170166

167+
- name: Run PHPUnit with coverage
168+
if: ${{ matrix.coverage }}
169+
run: |
170+
composer phpunit -- --coverage-clover build/logs/unit-coverage.xml
171+
171172
- name: Run PHPUnit
173+
if: ${{ ! matrix.coverage }}
172174
run: |
173-
if [[ ${{ matrix.coverage == true }} == true ]]; then
174-
composer phpunit -- --coverage-clover build/logs/unit-coverage.xml
175-
else
176-
composer phpunit
177-
fi
175+
composer phpunit
178176
179177
- name: Upload code coverage report
180178
if: ${{ matrix.coverage }}
@@ -273,6 +271,7 @@ jobs:
273271
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
274272

275273
- name: Change ImageMagick policy to allow pdf->png conversion.
274+
if: ${{ matrix.os == 'ubuntu-22.04' || matrix.os == '' }}
276275
run: |
277276
sudo sed -i 's/^.*policy.*coder.*none.*PDF.*//' /etc/ImageMagick-6/policy.xml
278277

0 commit comments

Comments
 (0)