File tree Expand file tree Collapse file tree 5 files changed +19
-30
lines changed
Expand file tree Collapse file tree 5 files changed +19
-30
lines changed Original file line number Diff line number Diff line change 1616 - name : Install PHP
1717 uses : shivammathur/setup-php@v2
1818 with :
19- php-version : ' 8.3 '
19+ php-version : ' 8.4 '
2020 coverage : ' none'
2121 tools : composer, cs2pr
2222
Original file line number Diff line number Diff line change 99 name : PHPUnit ${{ matrix.php }}
1010 runs-on : ubuntu-latest
1111
12- services :
13- mysql :
14- image : mysql:5.7
15- ports :
16- - 3306/tcp
17- env :
18- MYSQL_ROOT_PASSWORD : password
19- # Set health checks to wait until mysql has started
20- options : >-
21- --health-cmd "mysqladmin ping"
22- --health-interval 10s
23- --health-timeout 5s
24- --health-retries 3
25-
2612 strategy :
2713 fail-fast : false
2814 matrix :
29- php : [ '7 .4', '8.3 ' ]
15+ php : [ '8 .4', '8.5 ' ]
3016
3117 steps :
3218 - name : Check out Git repository
3319 uses : actions/checkout@v4
3420
21+ - name : Setup Node.js
22+ uses : actions/setup-node@v4
23+ with :
24+ node-version : 20
25+
3526 - name : Setup PHP
3627 uses : shivammathur/setup-php@v2
3728 with :
3829 php-version : ${{ matrix.php }}
3930 coverage : ' none'
4031 tools : composer
4132
42- - name : Install dependencies
33+ - name : Install Composer dependencies
4334 uses : ramsey/composer-install@v2
4435 with :
4536 composer-options : " --no-progress --no-ansi --no-interaction"
4637
47- - name : Install WordPress test setup
48- run : bash bin/install-wp-tests.sh wordpress_test root password 127.0.0.1:${{ job.services.mysql.ports[3306] }} latest
38+ - name : Install wp-env
39+ run : npm -g install @wordpress/env
40+
41+ - name : Override PHP version
42+ run : echo '{ "phpVersion":"${{ matrix.php }}" }' > .wp-env.override.json
4943
50- - name : Setup problem matchers for PHPUnit
51- run : echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
44+ - name : Start wp-env
45+ run : wp-env start
5246
5347 - name : Run tests
54- env :
55- WP_TESTS_DIR : /tmp/wordpress-tests-lib/
56- run : vendor/bin/phpunit
48+ run : wp-env run tests-cli --env-cwd=wp-content/plugins/wporg-gp-translation-events ./vendor/bin/phpunit
Original file line number Diff line number Diff line change 11{
22 "core" : null ,
3- "phpVersion" : " 8.3 " ,
3+ "phpVersion" : " 8.4 " ,
44 "plugins" : [
55 " GlotPress/GlotPress" ,
66 " https://downloads.wordpress.org/plugin/sqlite-object-cache.1.3.7.zip" ,
Original file line number Diff line number Diff line change 33 "description" : " " ,
44 "license" : " GPL-2.0-only" ,
55 "require-dev" : {
6- "phpunit/phpunit" : " ^9.6.16" ,
7- "yoast/phpunit-polyfills" : " ^2.0.0" ,
6+ "phpunit/phpunit" : " ^9.6.16 || ^10.0 || ^11.0 " ,
7+ "yoast/phpunit-polyfills" : " ^2.0.0 || ^3.0 " ,
88 "wp-coding-standards/wpcs" : " ^3.0"
99 },
1010 "scripts" :{
Original file line number Diff line number Diff line change 33 bootstrap=" tests/bootstrap.php"
44 backupGlobals=" false"
55 colors=" true"
6- convertErrorsToExceptions=" true"
7- convertNoticesToExceptions=" true"
8- convertWarningsToExceptions=" true"
96 >
107 <testsuites >
118 <testsuite name =" tests" >
You can’t perform that action at this time.
0 commit comments