mirror of
https://hk.gh-proxy.com/https://github.com/mcp-wp/mcp-server.git
synced 2025-10-03 21:21:17 +08:00
Fix coverage file paths
This commit is contained in:
parent
3fc1206b22
commit
89f4390661
3 changed files with 31 additions and 25 deletions
8
.github/workflows/lint-and-test.yml
vendored
8
.github/workflows/lint-and-test.yml
vendored
|
@ -117,7 +117,7 @@ jobs:
|
||||||
# See https://make.wordpress.org/core/handbook/references/phpunit-compatibility-and-wordpress-versions/
|
# See https://make.wordpress.org/core/handbook/references/phpunit-compatibility-and-wordpress-versions/
|
||||||
- name: Update PHPUnit
|
- name: Update PHPUnit
|
||||||
run: |
|
run: |
|
||||||
if [[ $PHP_VERSION == "8.0" || $PHP_VERSION == "8.1" || $PHP_VERSION == "8.2" ]]; then
|
if [[ $PHP_VERSION == "8.2" || $PHP_VERSION == "8.3" || $PHP_VERSION == "8.4" ]]; then
|
||||||
echo "Installing latest version of PHPUnit"
|
echo "Installing latest version of PHPUnit"
|
||||||
composer update --ignore-platform-reqs --no-interaction --no-scripts yoast/phpunit-polyfills --with-dependencies --with "phpunit/phpunit:^9.6"
|
composer update --ignore-platform-reqs --no-interaction --no-scripts yoast/phpunit-polyfills --with-dependencies --with "phpunit/phpunit:^9.6"
|
||||||
fi
|
fi
|
||||||
|
@ -133,8 +133,8 @@ jobs:
|
||||||
|
|
||||||
- name: Run tests with coverage
|
- name: Run tests with coverage
|
||||||
run: |
|
run: |
|
||||||
composer test -- --coverage-clover coverage.xml
|
composer test -- --coverage-clover artifacts/coverage.xml
|
||||||
composer test:multisite -- --coverage-clover coverage-multisite.xml
|
composer test:multisite -- --coverage-clover artifacts/coverage-multisite.xml
|
||||||
if: ${{ matrix.coverage }}
|
if: ${{ matrix.coverage }}
|
||||||
|
|
||||||
- name: Upload code coverage report
|
- name: Upload code coverage report
|
||||||
|
@ -148,7 +148,7 @@ jobs:
|
||||||
- name: Upload code coverage report
|
- name: Upload code coverage report
|
||||||
uses: codecov/codecov-action@v5.4.0
|
uses: codecov/codecov-action@v5.4.0
|
||||||
with:
|
with:
|
||||||
files: coverage-multisite.xml
|
files: artifacts/coverage-multisite.xml
|
||||||
flags: multisite
|
flags: multisite
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
if: ${{ matrix.coverage }}
|
if: ${{ matrix.coverage }}
|
||||||
|
|
|
@ -1,36 +1,33 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
<phpunit
|
<phpunit
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
bootstrap="tests/phpunit/bootstrap.php"
|
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd"
|
||||||
backupGlobals="false"
|
bootstrap="tests/phpunit/bootstrap.php"
|
||||||
colors="true"
|
cacheDirectory=".phpunit.cache"
|
||||||
failOnRisky="true"
|
backupGlobals="false"
|
||||||
convertErrorsToExceptions="true"
|
colors="true"
|
||||||
convertNoticesToExceptions="true"
|
failOnRisky="true"
|
||||||
convertWarningsToExceptions="true"
|
requireCoverageMetadata="false"
|
||||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.2/phpunit.xsd"
|
|
||||||
>
|
>
|
||||||
<php>
|
<php>
|
||||||
<ini name="error_reporting" value="32767" />
|
<ini name="error_reporting" value="32767"/>
|
||||||
<ini name="display_errors" value="1" />
|
<ini name="display_errors" value="1"/>
|
||||||
<ini name="display_startup_errors" value="1" />
|
<ini name="display_startup_errors" value="1"/>
|
||||||
<const name="WP_TESTS_MULTISITE" value="1" />
|
<const name="WP_TESTS_MULTISITE" value="1" />
|
||||||
</php>
|
</php>
|
||||||
|
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="Multisite Integration Test Suite">
|
<testsuite name="Multisite Integration Test Suite">
|
||||||
<directory suffix=".php">./tests/phpunit/tests</directory>
|
<directory suffix=".php">./tests/phpunit/tests</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
|
||||||
<groups>
|
<groups>
|
||||||
<exclude>
|
<exclude>
|
||||||
<group>ms-excluded</group>
|
<group>ms-excluded</group>
|
||||||
</exclude>
|
</exclude>
|
||||||
</groups>
|
</groups>
|
||||||
|
<source>
|
||||||
<filter>
|
<include>
|
||||||
<whitelist processUncoveredFilesFromWhitelist="false">
|
<directory suffix=".php">./src/</directory>
|
||||||
<directory suffix=".php">./inc/</directory>
|
</include>
|
||||||
</whitelist>
|
</source>
|
||||||
</filter>
|
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="tests/phpunit/bootstrap.php" backupGlobals="false" colors="true" failOnRisky="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd" cacheDirectory=".phpunit.cache">
|
<phpunit
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd"
|
||||||
|
bootstrap="tests/phpunit/bootstrap.php"
|
||||||
|
cacheDirectory=".phpunit.cache"
|
||||||
|
backupGlobals="false"
|
||||||
|
colors="true"
|
||||||
|
failOnRisky="true"
|
||||||
|
requireCoverageMetadata="false"
|
||||||
|
>
|
||||||
<php>
|
<php>
|
||||||
<ini name="error_reporting" value="32767"/>
|
<ini name="error_reporting" value="32767"/>
|
||||||
<ini name="display_errors" value="1"/>
|
<ini name="display_errors" value="1"/>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue