Skip to content

Commit

Permalink
Build/Test Tools: Don’t upload HTML reports to Codecov.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
desrosj committed May 14, 2024
1 parent b4889e4 commit 6ee6fcb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:
run: git diff --exit-code

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

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

0 comments on commit 6ee6fcb

Please sign in to comment.