Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ jobs:
WP_TESTS_ELEMENTOR_DIR: /tmp/elementor/elementor.php
WP_TESTS_HELLOPLUS_DIR: /tmp/hello-plus/hello-plus.php
THEME_FILE: functions.php
COVERAGE: ${{ matrix.php_versions >= 8.3 && matrix.wordpress_versions == 'latest' && github.event_name == 'push' }}
services:
mysql:
image: mysql:5.7
Expand Down Expand Up @@ -92,14 +91,8 @@ jobs:
run: |
cp -a $GITHUB_WORKSPACE /tmp/wordpress/wp-content/themes/
echo "Copied theme folder to /tmp/wordpress/wp-content/themes/$(basename $GITHUB_WORKSPACE)"
- name: Run Tests with Coverage (latest PHP & WP)
if: ${{ env.COVERAGE != 'false' }}
run: |
composer run coverage
- name: Run Tests without Coverage
if: ${{ env.COVERAGE == 'false' }}
run: |
composer run test
- name: Run tests
run: composer run test

test-result:
needs: test
Expand Down
8 changes: 2 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"wp-coding-standards/wpcs": "^2.3",
"phpunit/phpunit": "^9.6.33",
"elementor/elementor-editor-testing": "0.0.3",
"yoast/phpunit-polyfills": "^1.0.1",
"thor-juhasz/phpunit-coverage-check": "^0.3.0"
"yoast/phpunit-polyfills": "^1.0.1"
},
"require": {
"elementor/wp-notifications-package": "1.2.*"
Expand All @@ -24,9 +23,6 @@
"lint": "phpcs --extensions=php --standard=./phpcs.xml --ignore=node_modules,vendor,assets,tmp -p .",
"lint:fix": "vendor/bin/phpcbf --extensions=php --standard=./phpcs.xml --ignore=node_modules,vendor,assets,tmp .",
"test": "phpunit --testsuite hello-elementor",
"test:install": "bash ./bin/install-wp-tests-local.sh",
"coverage": "composer run coverage:test && composer run coverage:check",
"coverage:test": "phpdbg -qrr vendor/phpunit/phpunit/phpunit --testsuite hello-elementor --coverage-clover coverage-report/clover.xml",
"coverage:check": "phpunit-coverage-check -t 20 coverage-report/clover.xml"
"test:install": "bash ./bin/install-wp-tests-local.sh"
}
}
Loading
Loading