Skip to content

Commit 6ee6fcb

Browse files
committed
Build/Test Tools: Don’t upload HTML reports to Codecov.
When generating a human readable code coverage report in HTML format, the Codecov action used to fail silently. An error is now being returned, resulting in a workflow failure. This adds a skip condition to the appropriate steps so the coverage report is only uploaded when a `clover` format is generated. See #60733. git-svn-id: https://develop.svn.wordpress.org/trunk@58144 602fd350-edb4-49c9-b593-d223f7449a82
1 parent b4889e4 commit 6ee6fcb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/test-coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ jobs:
150150
run: git diff --exit-code
151151

152152
- name: Upload single site report to Codecov
153-
if: ${{ ! matrix.multisite && github.event_name != 'pull_request' }}
153+
if: ${{ ! matrix.multisite && matrix.format == 'clover' && github.event_name != 'pull_request' }}
154154
uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4.1.0
155155
with:
156156
token: ${{ secrets.CODECOV_TOKEN }}
@@ -174,7 +174,7 @@ jobs:
174174
run: git diff --exit-code
175175

176176
- name: Upload multisite report to Codecov
177-
if: ${{ matrix.multisite && github.event_name != 'pull_request' }}
177+
if: ${{ matrix.multisite && matrix.format == 'clover' && github.event_name != 'pull_request' }}
178178
uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4.1.0
179179
with:
180180
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)