Skip to content

Commit 067740b

Browse files
authored
Merge pull request #2568 from rodrigoprimo/update-unit-test-workflow
GH Actions/unit-tests: don't run code coverage in forks
2 parents afcb17e + 4083546 commit 067740b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/unit-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,15 @@ jobs:
135135
run: composer lint -- --checkstyle | cs2pr
136136

137137
- name: Run the unit tests without code coverage
138-
if: ${{ matrix.coverage == false }}
138+
if: ${{ matrix.coverage == false || github.repository_owner != 'WordPress' }}
139139
run: composer run-tests
140140

141141
- name: Run the unit tests with code coverage
142-
if: ${{ matrix.coverage == true }}
142+
if: ${{ matrix.coverage == true && github.repository_owner == 'WordPress' }}
143143
run: composer coverage
144144

145145
- name: Send coverage report to Codecov
146-
if: ${{ success() && matrix.coverage == true }}
146+
if: ${{ success() && matrix.coverage == true && github.repository_owner == 'WordPress' }}
147147
uses: codecov/codecov-action@v5
148148
with:
149149
files: ./build/logs/clover.xml

0 commit comments

Comments
 (0)