Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 70fd52a

Browse files
authored
Temporarily skip PHP Unit Tests for PHP 8.1 and 8.2 (#9859)
* Allow failure of the PHP Unit Tests * Limit the PHP versions to 7.4 and 8.0 to run unit tests * Don't allow failing fast * Add a comment explaining the skipped part * Cancel jobs later * Cancel all the steps in workflow based on the same condition
1 parent 2b2c978 commit 70fd52a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/unit-tests.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,28 +80,38 @@ jobs:
8080
##
8181
- name: Set up PHP
8282
uses: shivammathur/setup-php@v2
83+
# 8.1 and 8.2 are temporarily disabled as docker-images for those cause the errors when pipeline is running
84+
if: ${{ matrix.php == '7.4' || matrix.php == '8.0' }}
8385
with:
8486
php-version: '${{ matrix.php }}'
8587
ini-file: development
8688
coverage: none
8789

8890
# Ensure that Composer installs the correct versions of packages.
8991
- name: Override PHP version in composer.json
92+
# 8.1 and 8.2 are temporarily disabled as docker-images for those cause the errors when pipeline is running
93+
if: ${{ matrix.php == '7.4' || matrix.php == '8.0' }}
9094
run: |
9195
composer config platform.php ${{ matrix.php }}
9296
composer update
9397
9498
- name: Install npm dependencies
99+
# 8.1 and 8.2 are temporarily disabled as docker-images for those cause the errors when pipeline is running
100+
if: ${{ matrix.php == '7.4' || matrix.php == '8.0' }}
95101
run: |
96102
npm ci
97103
npm run build
98104
99105
- name: Docker debug information
106+
# 8.1 and 8.2 are temporarily disabled as docker-images for those cause the errors when pipeline is running
107+
if: ${{ matrix.php == '7.4' || matrix.php == '8.0' }}
100108
run: |
101109
docker -v
102110
docker-compose -v
103111
104112
- name: General debug information
113+
# 8.1 and 8.2 are temporarily disabled as docker-images for those cause the errors when pipeline is running
114+
if: ${{ matrix.php == '7.4' || matrix.php == '8.0' }}
105115
run: |
106116
npm --version
107117
node --version
@@ -111,12 +121,18 @@ jobs:
111121
locale -a
112122
113123
- name: Start Docker environment
124+
# 8.1 and 8.2 are temporarily disabled as docker-images for those cause the errors when pipeline is running
125+
if: ${{ matrix.php == '7.4' || matrix.php == '8.0' }}
114126
run: npm run wp-env start --update
115127

116128
- name: Log running Docker containers
129+
# 8.1 and 8.2 are temporarily disabled as docker-images for those cause the errors when pipeline is running
130+
if: ${{ matrix.php == '7.4' || matrix.php == '8.0' }}
117131
run: docker ps -a
118132

119133
- name: Docker container debug information
134+
# 8.1 and 8.2 are temporarily disabled as docker-images for those cause the errors when pipeline is running
135+
if: ${{ matrix.php == '7.4' || matrix.php == '8.0' }}
120136
run: |
121137
npm run wp-env run tests-mysql mysql -- --version
122138
npm run wp-env run tests-wordpress "php --version"
@@ -125,4 +141,6 @@ jobs:
125141
npm run wp-env run tests-wordpress "locale -a"
126142
127143
- name: Run PHPUnit tests
144+
# 8.1 and 8.2 are temporarily disabled as docker-images for those cause the errors when pipeline is running
145+
if: ${{ matrix.php == '7.4' || matrix.php == '8.0' }}
128146
run: npm run test:php

0 commit comments

Comments
 (0)