WordPress.org

Make WordPress Core

Changeset 50592


Ignore:
Timestamp:
03/26/2021 01:23:52 PM (6 months ago)
Author:
desrosj
Message:

Build/Test Tools: Fix code coverage reporting to generate report from src.

Since [50441-50442] switched the test workflows to run from src instead of build, code coverage reporting has stopped working. This was caused by the code coverage configuration continuing to reference build. This corrects the configuration so coverage reporting can resume.

This change also introduces the workflow_dispatch event to the workflow, which will allow committers to manually run the workflow when desired. For example, to confirm changes to the test suite do not break reporting.

This also adds the phpunit.xml.dist and tests/phpunit/multisite.xml files to the paths list. Since these files are responsible for configuring the test suite and code coverage reporting, any changes to them should verify that no problems were introduced.

Props jrf, johnbillion.
Fixes #52786. See #51734.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/test-coverage.yml

    r50486 r50592  
    22
    33on:
     4  # Verify
     5  push:
     6    branches:
     7      - master
     8      - trunk
     9    paths:
     10      - 'phpunit.xml.dist'
     11      - 'tests/phpunit/multisite.xml'
    412  # Once daily at 00:00 UTC.
    513  schedule:
    614    - cron: '0 0 * * *'
     15  # Allow manually triggering the workflow.
     16  workflow_dispatch:
    717
    818env:
  • trunk/phpunit.xml.dist

    r48847 r50592  
    4343    <filter>
    4444        <whitelist addUncoveredFilesFromWhitelist="true">
    45             <directory suffix=".php">build</directory>
     45            <directory suffix=".php">src</directory>
    4646            <exclude>
    4747                <!-- Third party library exclusions. -->
    48                 <directory suffix=".php">build/wp-includes/ID3</directory>
    49                 <directory suffix=".php">build/wp-includes/IXR</directory>
    50                 <directory suffix=".php">build/wp-includes/random_compat</directory>
    51                 <directory suffix=".php">build/wp-includes/PHPMailer</directory>
    52                 <directory suffix=".php">build/wp-includes/Requests</directory>
    53                 <directory suffix=".php">build/wp-includes/SimplePie</directory>
    54                 <directory suffix=".php">build/wp-includes/sodium_compat</directory>
    55                 <directory suffix=".php">build/wp-includes/Text</directory>
     48                <directory suffix=".php">src/wp-includes/ID3</directory>
     49                <directory suffix=".php">src/wp-includes/IXR</directory>
     50                <directory suffix=".php">src/wp-includes/random_compat</directory>
     51                <directory suffix=".php">src/wp-includes/PHPMailer</directory>
     52                <directory suffix=".php">src/wp-includes/Requests</directory>
     53                <directory suffix=".php">src/wp-includes/SimplePie</directory>
     54                <directory suffix=".php">src/wp-includes/sodium_compat</directory>
     55                <directory suffix=".php">src/wp-includes/Text</directory>
    5656
    5757                <!-- Plugins and themes. -->
    58                 <directory suffix=".php">build/wp-content/</directory>
     58                <directory suffix=".php">src/wp-content/</directory>
    5959
    60                 <file>build/wp-admin/includes/class-ftp*</file>
    61                 <file>build/wp-admin/includes/class-pclzip.php</file>
    62                 <file>build/wp-admin/includes/deprecated.php</file>
    63                 <file>build/wp-admin/includes/ms-deprecated.php</file>
     60                <file>src/wp-admin/includes/class-ftp*</file>
     61                <file>src/wp-admin/includes/class-pclzip.php</file>
     62                <file>src/wp-admin/includes/deprecated.php</file>
     63                <file>src/wp-admin/includes/ms-deprecated.php</file>
    6464
    65                 <file>build/wp-includes/atomlib.php</file>
    66                 <file>build/wp-includes/class-IXR.php</file>
    67                 <file>build/wp-includes/class-json.php</file>
    68                 <file>build/wp-includes/class-phpass.php</file>
    69                 <file>build/wp-includes/class-pop3.php</file>
    70                 <file>build/wp-includes/class-requests.php</file>
    71                 <file>build/wp-includes/class-simplepie.php</file>
    72                 <file>build/wp-includes/class-snoopy.php</file>
    73                 <file>build/wp-includes/deprecated.php</file>
    74                 <file>build/wp-includes/ms-deprecated.php</file>
    75                 <file>build/wp-includes/pluggable-deprecated.php</file>
    76                 <file>build/wp-includes/rss.php</file>
     65                <file>src/wp-includes/atomlib.php</file>
     66                <file>src/wp-includes/class-IXR.php</file>
     67                <file>src/wp-includes/class-json.php</file>
     68                <file>src/wp-includes/class-phpass.php</file>
     69                <file>src/wp-includes/class-pop3.php</file>
     70                <file>src/wp-includes/class-requests.php</file>
     71                <file>src/wp-includes/class-simplepie.php</file>
     72                <file>src/wp-includes/class-snoopy.php</file>
     73                <file>src/wp-includes/deprecated.php</file>
     74                <file>src/wp-includes/ms-deprecated.php</file>
     75                <file>src/wp-includes/pluggable-deprecated.php</file>
     76                <file>src/wp-includes/rss.php</file>
    7777            </exclude>
    7878        </whitelist>
  • trunk/tests/phpunit/multisite.xml

    r49797 r50592  
    4242    <filter>
    4343        <whitelist addUncoveredFilesFromWhitelist="true">
    44             <directory suffix=".php">../../build</directory>
     44            <directory suffix=".php">../../src</directory>
    4545            <exclude>
    4646                <!-- Third party library exclusions. -->
    47                 <directory suffix=".php">../../build/wp-includes/ID3</directory>
    48                 <directory suffix=".php">../../build/wp-includes/IXR</directory>
    49                 <directory suffix=".php">../../build/wp-includes/random_compat</directory>
    50                 <directory suffix=".php">../../build/wp-includes/PHPMailer</directory>
    51                 <directory suffix=".php">../../build/wp-includes/Requests</directory>
    52                 <directory suffix=".php">../../build/wp-includes/SimplePie</directory>
    53                 <directory suffix=".php">../../build/wp-includes/sodium_compat</directory>
    54                 <directory suffix=".php">../../build/wp-includes/Text</directory>
     47                <directory suffix=".php">../../src/wp-includes/ID3</directory>
     48                <directory suffix=".php">../../src/wp-includes/IXR</directory>
     49                <directory suffix=".php">../../src/wp-includes/random_compat</directory>
     50                <directory suffix=".php">../../src/wp-includes/PHPMailer</directory>
     51                <directory suffix=".php">../../src/wp-includes/Requests</directory>
     52                <directory suffix=".php">../../src/wp-includes/SimplePie</directory>
     53                <directory suffix=".php">../../src/wp-includes/sodium_compat</directory>
     54                <directory suffix=".php">../../src/wp-includes/Text</directory>
    5555
    5656                <!-- Plugins and themes. -->
    57                 <directory suffix=".php">../../build/wp-content/</directory>
     57                <directory suffix=".php">../../src/wp-content/</directory>
    5858
    59                 <file>../../build/wp-admin/includes/class-ftp*</file>
    60                 <file>../../build/wp-admin/includes/class-pclzip.php</file>
    61                 <file>../../build/wp-admin/includes/deprecated.php</file>
    62                 <file>../../build/wp-admin/includes/ms-deprecated.php</file>
     59                <file>../../src/wp-admin/includes/class-ftp*</file>
     60                <file>../../src/wp-admin/includes/class-pclzip.php</file>
     61                <file>../../src/wp-admin/includes/deprecated.php</file>
     62                <file>../../src/wp-admin/includes/ms-deprecated.php</file>
    6363
    64                 <file>../../build/wp-includes/atomlib.php</file>
    65                 <file>../../build/wp-includes/class-IXR.php</file>
    66                 <file>../../build/wp-includes/class-json.php</file>
    67                 <file>../../build/wp-includes/class-phpass.php</file>
    68                 <file>../../build/wp-includes/class-pop3.php</file>
    69                 <file>../../build/wp-includes/class-requests.php</file>
    70                 <file>../../build/wp-includes/class-simplepie.php</file>
    71                 <file>../../build/wp-includes/class-snoopy.php</file>
    72                 <file>../../build/wp-includes/deprecated.php</file>
    73                 <file>../../build/wp-includes/ms-deprecated.php</file>
    74                 <file>../../build/wp-includes/pluggable-deprecated.php</file>
    75                 <file>../../build/wp-includes/rss.php</file>
     64                <file>../../src/wp-includes/atomlib.php</file>
     65                <file>../../src/wp-includes/class-IXR.php</file>
     66                <file>../../src/wp-includes/class-json.php</file>
     67                <file>../../src/wp-includes/class-phpass.php</file>
     68                <file>../../src/wp-includes/class-pop3.php</file>
     69                <file>../../src/wp-includes/class-requests.php</file>
     70                <file>../../src/wp-includes/class-simplepie.php</file>
     71                <file>../../src/wp-includes/class-snoopy.php</file>
     72                <file>../../src/wp-includes/deprecated.php</file>
     73                <file>../../src/wp-includes/ms-deprecated.php</file>
     74                <file>../../src/wp-includes/pluggable-deprecated.php</file>
     75                <file>../../src/wp-includes/rss.php</file>
    7676            </exclude>
    7777        </whitelist>
Note: See TracChangeset for help on using the changeset viewer.