Skip to content

Commit 92971e2

Browse files
committed
Update unit-tests.yml
1 parent 7b02eb3 commit 92971e2

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

Diff for: .github/workflows/unit-tests.yml

+15-18
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ jobs:
3737
- php: '8.2'
3838
wp: 'latest'
3939
experimental: true
40-
- php: '8.4'
41-
wp: 'latest'
40+
- php: '8.2'
41+
wp: '6.3'
4242
experimental: true
4343
- php: '8.0'
4444
wp: '5.9'
@@ -71,23 +71,18 @@ jobs:
7171
uses: shivammathur/setup-php@v2
7272
with:
7373
php-version: ${{ matrix.php }}
74-
tools: phpunit-polyfills
74+
extensions: mysqli, mysql
7575
coverage: none
76-
# The PHP 5.6 and 7.0 images don't include mysql[i] by default.
77-
extensions: mysqli
78-
79-
- name: Set up WordPress
80-
run: phpunit/install.sh wordpress_test root '' 127.0.0.1:3306 ${{ matrix.wp }}
8176

8277
# On WP 5.2, PHPUnit 5.x, 6.x and 7.x are supported.
8378
# On PHP >= 8.0, PHPUnit 7.5+ is needed, no matter what.
8479
- name: Determine supported PHPUnit version
8580
id: set_phpunit
8681
run: |
87-
if [[ "${{ matrix.php }}" > "7.4" ]]; then
88-
echo "PHPUNIT=8.5.*" >> $GITHUB_ENV
82+
if [[ "${{ matrix.php }}" > "8.0" ]]; then
83+
echo "PHPUNIT=9.*" >> $GITHUB_ENV
8984
else
90-
echo "PHPUNIT=5.7.*||6.*||7.5.*" >> $GITHUB_ENV
85+
echo "PHPUNIT=5.7.*||6.*||7.5.*||8.5.*" >> $GITHUB_ENV
9186
fi
9287
9388
- name: 'Composer: set up PHPUnit'
@@ -108,21 +103,23 @@ jobs:
108103
with:
109104
composer-options: --ignore-platform-reqs
110105

111-
- name: 'Run Composer Update'
112-
run: |
113-
composer update --ignore-platform-reqs
106+
- name: Install Subversion
107+
run: sudo apt-get install subversion
108+
109+
- name: Set up WordPress
110+
run: phpunit/install.sh wordpress_test root '' 127.0.0.1:3306 ${{ matrix.wp }}
114111

115112
- name: Tool versions
116113
run: |
117114
php --version
118115
composer --version
119-
phpunit --version
120-
which phpunit
116+
./vendor/bin/phpunit --version
117+
which ./vendor/bin/phpunit
121118
122119
- name: Run the unit tests - single site
123-
run: vendor/bin/phpunit
120+
run: ./vendor/bin/phpunit
124121

125122
- name: Run the unit tests - multisite
126-
run: vendor/bin/phpunit
127123
env:
128124
WP_MULTISITE: 1
125+
run: ./vendor/bin/phpunit

0 commit comments

Comments
 (0)