Make WordPress Core


Ignore:
Timestamp:
06/21/2022 11:59:29 PM (2 years ago)
Author:
desrosj
Message:

Build/Test Tools: Allow changes to the code coverage workflow to run on pull request.

This adds the pull_request event to the Code Coverage Report workflow, allowing changes to be verified in a pull request before being committed.

The branches and paths filters are used to limit when the workflow runs to pull requests with:

  • A base branch of trunk.
  • Changing specific files that can potentially affect the way a coverage report is generated.

Reports generated on pull_request events are for testing purposes only and are not submitted to Codecov.

The docker-compose.yml file has also been added to the paths filter for both push and pull_request events. Changes to this file could potentially affect the environment used to generate the report (such as the ones in [53552]).

Props afragen, johnbillion, desrosj.
See #55652.

File:
1 edited

Legend:

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

    r53552 r53553  
    88    paths:
    99      - '.github/workflows/test-coverage.yml'
     10      - 'docker-compose.yml'
     11      - 'phpunit.xml.dist'
     12      - 'tests/phpunit/multisite.xml'
     13  pull_request:
     14    branches:
     15      - trunk
     16    paths:
     17      - '.github/workflows/test-coverage.yml'
     18      - 'docker-compose.yml'
    1019      - 'phpunit.xml.dist'
    1120      - 'tests/phpunit/multisite.xml'
     
    151160
    152161      - name: Upload single site report to Codecov
    153         if: ${{ ! matrix.multisite }}
     162        if: ${{ ! matrix.multisite && github.event_name != 'pull_request' }}
    154163        uses: codecov/codecov-action@e3c560433a6cc60aec8812599b7844a7b4fa0d71 # v3.0.0
    155164        with:
     
    165174
    166175      - name: Upload multisite report to Codecov
    167         if: ${{ matrix.multisite }}
     176        if: ${{ matrix.multisite && github.event_name != 'pull_request' }}
    168177        uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
    169178        with:
Note: See TracChangeset for help on using the changeset viewer.