Skip to content

Conversation

@rodrigoprimo
Copy link
Collaborator

The unit-tests workflow runs code coverage for pushes to main and pull requests, but wasn't limited to this repo.

This resulted in failing builds for contributors who have actions enabled on their fork. The reason for the failure is that they don't have access to the CODECOV_TOKEN.

This commit changes the conditions on when to run the tests normally and when to run with code coverage to take the organisation where the repo lives into account. That should prevent the failing builds in forks.

Similar to #2542, which applied the same change to the quicktestworkflow.

The `unit-tests` workflow runs code coverage for pushes to `main` and pull requests, but wasn't limited to this repo.

This resulted in failing builds for contributors who have actions enabled on their fork. The reason for the failure is that they don't have access to the `CODECOV_TOKEN`.

This commit changes the conditions on when to run the tests normally and when to run with code coverage to take the organisation where the repo lives into account. That should prevent the failing builds in forks.
Copy link
Member

@jrfnl jrfnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rodrigoprimo ! LGTM.

I wonder if we shouldn't improve the workflow organisation to only have code coverage in the unit-test.yml workflow - probably via a separate job, but that's for a future iteration.

@jrfnl jrfnl added this to the 3.2.x milestone Aug 5, 2025
@dingo-d dingo-d merged commit 067740b into WordPress:develop Aug 5, 2025
41 checks passed
@rodrigoprimo rodrigoprimo deleted the update-unit-test-workflow branch August 5, 2025 19:50
@jrfnl jrfnl modified the milestones: 3.2.x, 3.3.0 Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants