Skip to content

Commit 2ad1f8b

Browse files
committed
ci: switch to using a composer script to run unit tests
1 parent 96a6b63 commit 2ad1f8b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/test-php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Install Composer dependencies
5454
run: composer install --prefer-dist --no-progress --no-suggest --no-dev
5555
- name: Run phpunit
56-
run: phpunit
56+
run: composer phpunit
5757
phpstan:
5858
name: PHPStan on PHP 8.0
5959
runs-on: ubuntu-latest

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
"scripts": {
4848
"format": "phpcbf --standard=phpcs.xml --report-summary --report-source",
4949
"phpcs": "phpcs --standard=phpcs.xml --extensions=php -s -d memory_limit=-1",
50-
"test": "[ -z \"$WP_TESTS_DIR\" ] || [ -z \"$WP_CORE_DIR\" ] && echo 'Error: Both WP_TESTS_DIR and WP_CORE_DIR must be defined.' && exit 1 || phpunit --configuration=phpunit.xml",
5150
"phpstan": "phpstan analyse --memory-limit=-1",
51+
"phpunit": "phpunit --configuration=phpunit.xml",
5252
"install-wp-tests": "bash bin/install-wp-tests.sh wordpress_tests root root 127.0.0.1 latest true"
5353
},
5454
"require": {

0 commit comments

Comments
 (0)