Skip to content

Commit

Permalink
Merge pull request #111 from newfold-labs/Add/test-tools
Browse files Browse the repository at this point in the history
Further test changes
  • Loading branch information
BrianHenryIE authored Nov 18, 2024
2 parents 92623bc + 038002b commit 74ccb17
Show file tree
Hide file tree
Showing 6 changed files with 1,659 additions and 1,034 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/unit-tests-and-coverage-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

services:
mysql:
image: mysql:8.0
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: tests-wordpress
Expand Down Expand Up @@ -93,10 +93,10 @@ jobs:
mkdir gh-pages/phpunit || true;
- name: Run unit tests
run: XDEBUG_MODE=coverage vendor/bin/phpunit --bootstrap tests/phpunit/bootstrap.php --coverage-php tests/_output/unit.cov || true;
run: XDEBUG_MODE=coverage vendor/bin/phpunit --bootstrap tests/phpunit/bootstrap.php --coverage-php tests/_output/unit.cov

- name: Run wpunit tests
run: XDEBUG_MODE=coverage vendor/bin/codecept run wpunit --coverage tests/_output/wpunit.cov --debug || true;
run: XDEBUG_MODE=coverage vendor/bin/codecept run wpunit --coverage tests/_output/wpunit.cov --debug

- name: Merge code coverage
run: vendor/bin/phpcov merge --clover gh-pages/phpunit/clover.xml --php gh-pages/phpunit/phpunit.cov --html gh-pages/phpunit/html/ tests/_output/;
Expand Down
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
"codecept run wpunit"
],
"test-coverage": [
"if [ -d \"tests/_output/merged.cov\" ]; then rm -rf tests/_output/merged.cov; fi;",
"phpunit --bootstrap tests/phpunit/bootstrap.php --coverage-php tests/_output/unit.cov --coverage-text",
"codecept run wpunit --coverage wpunit.cov",
"phpcov merge --php tests/_output/merged.cov --html tests/_output/html tests/_output;",
Expand Down Expand Up @@ -113,16 +114,17 @@
"wpscholar/url": "^1.2.2"
},
"require-dev": {
"10up/wp_mock": "^0.4.2",
"10up/wp_mock": "^0.5.0|^1.0.0",
"bluehost/bluehost-wordpress-plugin": ">=3.1",
"brianhenryie/composer-phpstorm": ">=0.4",
"johnpbloch/wordpress": ">=6.5.3",
"kporras07/composer-symlinks": "^1.2",
"lucatume/wp-browser": "^3.5.8",
"newfold-labs/wp-php-standards": "^1.2.3",
"phpunit/phpcov": "^5.0",
"phpunit/phpcov": "^8.2.1",
"wpackagist-plugin/jetpack": "^14.0",
"wpackagist-plugin/woocommerce": ">=9"
"wpackagist-plugin/woocommerce": ">=9",
"wpackagist-theme/twentytwentyfive": "*"
},
"extra": {
"symlinks": {
Expand Down
Loading

0 comments on commit 74ccb17

Please sign in to comment.