@@ -7,50 +7,47 @@ concurrency:
77 cancel-in-progress : true
88
99jobs :
10- build :
10+ test :
11+ # Alias 'master' to 'latest'
12+ name : WP ${{ matrix.wp == 'master' && 'latest' || matrix.wp }} and PHP ${{ matrix.php }}
1113 runs-on : ubuntu-latest
14+ continue-on-error : ${{ matrix.allowed_failure }}
1215
1316 strategy :
17+ fail-fast : false
1418 matrix :
15- php-versions :
16- - 8.0
17-
18- env :
19- DB_DATABASE : test_db
20- DB_USER : root
21- DB_PASSWORD : root
19+ include :
20+ # Check lowest supported WP version, with the lowest supported PHP.
21+ - php : " 8.0"
22+ wp : " 6.0"
23+ allowed_failure : false
24+ # Check latest WP with the highest supported PHP.
25+ - php : " latest"
26+ wp : " master"
27+ allowed_failure : false
2228
2329 steps :
24- - name : Checkout
25- uses : actions/checkout@v2
30+ - name : Checkout code
31+ uses : actions/checkout@v4
2632
2733 - name : Install wordpress environment
2834 run : npm -g install @wordpress/env
2935
30- - name : Setup PHP
36+ - name : Setup PHP ${{ matrix.php }}
3137 uses : shivammathur/setup-php@v2
3238 with :
39+ php-version : ${{ matrix.php }}
3340 tools : composer
34- php-version : ${{ matrix.php-versions }}
35-
36- - name : Setup MySQL
37- run : |
38- sudo /etc/init.d/mysql start
3941
40- - name : Cache Composer packages
41- id : composer-cache
42- uses : actions/cache@v2
42+ - name : Install Composer dependencies
43+ uses : ramsey/composer-install@v3
4344 with :
44- path : vendor
45- key : ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
46- restore-keys : |
47- ${{ runner.os }}-php-
48-
49- - name : Install dependencies
50- run : composer install --prefer-dist --no-progress
45+ composer-options : --prefer-dist --no-progress
5146
52- - name : Setup the wordpress environment
47+ - name : Setup wp-env
5348 run : wp-env start
49+ env :
50+ WP_ENV_CORE : WordPress/WordPress#${{ matrix.wp }}
5451
5552 - name : PHPUnit
5653 run : composer test
0 commit comments