Skip to content

Commit 7a3fd08

Browse files
committed
fix test workflow
1 parent cc053c9 commit 7a3fd08

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

.github/workflows/test.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,28 @@ jobs:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
19+
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
20+
services:
21+
mysql:
22+
image: mysql:5.7
23+
env:
24+
MYSQL_ROOT_PASSWORD: root
25+
MYSQL_DATABASE: wordpress_test
26+
ports:
27+
- 3306
28+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
2029
steps:
2130
- name: Checkout
2231
uses: actions/checkout@v2
2332
- name: Install dependencies
2433
run: composer install --no-progress
34+
- name: Setup PHP
35+
uses: shivammathur/setup-php@v1
36+
with:
37+
php-version: ${{ matrix.php }}
38+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick
39+
coverage: none
2540
- name: PHPUnit
2641
run: |
27-
composer setup-local-tests
28-
composer phpunit
42+
bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:${{ job.services.mysql.ports['3306'] }} latest true
43+
vendor/bin/phpunit

0 commit comments

Comments
 (0)