File tree Expand file tree Collapse file tree 4 files changed +67
-15
lines changed
Expand file tree Collapse file tree 4 files changed +67
-15
lines changed Original file line number Diff line number Diff line change @@ -21,20 +21,16 @@ jobs:
2121 run : |
2222 composer install
2323 npm install
24- - name : Setup MySQL
24+ - name : Start MySQL
2525 run : |
2626 sudo /etc/init.d/mysql start
27- mysql -e 'CREATE DATABASE IF NOT EXISTS wordpress_test;' -uroot -proot
28- mysql -e 'SHOW DATABASES;' -uroot -proot
29- - name : Install WP Unit tests
30- run : |
31- php -v
3227 mysqladmin -V
33- bash .bin/install-wp-tests.sh wordpress_test root root localhost latest true
28+ - name : Setup WP-CLI
29+ uses : godaddy-wordpress/setup-wp-cli@1
3430 - name : Run linter
3531 run : composer lint
3632 - name : Run tests
37- run : composer test
33+ run : bash ./bin/phpunit- test.sh
3834 wporg-code-analysis :
3935 runs-on : ubuntu-latest
4036 name : WP.org Code Analysis
Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ node_modules/
1010
1111/vendor /
1212
13+ # WPUnit Helpers
14+ bin /helpers.sh
15+ bin /install-local-tests.sh
16+ bin /install-wp-tests.sh
17+ bin /phpunit-test.sh
18+
1319# Built files
1420assets /css /* .css
1521assets /css /* .css.map
Original file line number Diff line number Diff line change 1515 "pantheon-systems/pantheon-wp-coding-standards" : " ^2.0" ,
1616 "pantheon-systems/pantheon-wordpress-upstream-tests" : " dev-master" ,
1717 "phpunit/phpunit" : " ^9" ,
18- "yoast/phpunit-polyfills" : " ^1.0"
18+ "yoast/phpunit-polyfills" : " ^1.0" ,
19+ "pantheon-systems/wpunit-helpers" : " ^2.0"
1920 },
2021 "scripts" : {
2122 "lint" : [
2627 "phpcs" : " vendor/bin/phpcs -s ." ,
2728 "phpcbf" : " vendor/bin/phpcbf" ,
2829 "phpunit" : " vendor/bin/phpunit" ,
29- "test" : " @phpunit"
30+ "test" : " @phpunit" ,
31+ "test:install" : " bin/install-local-tests.sh --skip-db=true" ,
32+ "test:install:withdb" : " bin/install-local-tests.sh"
3033 },
3134 "config" : {
3235 "allow-plugins" : {
33- "dealerdirect/phpcodesniffer-composer-installer" : true
36+ "dealerdirect/phpcodesniffer-composer-installer" : true ,
37+ "pantheon-systems/wpunit-helpers" : true
3438 }
3539 }
3640}
You can’t perform that action at this time.
0 commit comments