Skip to content

Commit e017fb1

Browse files
committed
run test with coverage
1 parent b3ea118 commit e017fb1

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.github/workflows/php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
run: yarn add @wordpress/env -D
4646

4747
- name: Start wp-env
48-
run: yarn wp-env
48+
run: yarn wp-env:coverage
4949

5050
- name: WordPress unit test
5151
run: yarn php:unit

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"version:minor": "node ./scripts/version minor",
2020
"version:patch": "node ./scripts/version patch",
2121
"wp-env": "wp-env start",
22+
"wp-env:coverage": "wp-env start --xdebug=coverage",
2223
"php:unit": "wp-env run --env-cwd='wp-content/plugins/feature-flags' tests-wordpress composer test:unit",
2324
"php:integration": "wp-env run tests-wordpress --env-cwd=wp-content/plugins/feature-flags composer test:integration",
2425
"php:multisite": "wp-env run tests-wordpress --env-cwd=wp-content/plugins/feature-flags composer test:multisite"

phpunit-integration-multisite.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?xml version="1.0"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="tests/integration/bootstrap.php" backupGlobals="false" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3-
<coverage/>
3+
<coverage processUncoveredFiles="true">
4+
<include>
5+
<directory suffix=".php">./includes</directory>
6+
</include>
7+
</coverage>
48
<php>
59
<const name="WP_TESTS_MULTISITE" value="1" />
610
</php>

0 commit comments

Comments
 (0)