Skip to content

Commit 6ec1e0e

Browse files
committed
Disable codacy for PR from fork
1 parent 79e7d10 commit 6ec1e0e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/CI.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,9 @@ jobs:
106106
run: make test-unit && make test-functional
107107

108108
# Upload to codacy first as codecov action always remove coverage files despite move_coverage_to_trash at false
109+
# And only if it's not a PR from a fork => Can't work as codacy secret is not accessible in that context
109110
- name: Upload coverages to Codacy
110-
if: ${{ env.COVERAGE_TYPE == 'xdebug' }}
111+
if: ${{ github.event.pull_request.head.repo.full_name == 'yoanm/symfony-jsonrpc-http-server' && env.COVERAGE_TYPE == 'xdebug' }}
111112
run: ${{ env.CODACY_BIN }} report -r build/coverage-phpunit/unit.clover -r build/coverage-behat/clover.xml -r build/coverage-phpunit/functional.clover -t ${{ secrets.CODACY_PROJECT_TOKEN }} --partial
112113

113114
# See the reports at https://codecov.io/gh/yoanm/symfony-jsonrpc-http-server
@@ -172,6 +173,7 @@ jobs:
172173
finalize-codacy-coverage-report:
173174
runs-on: ubuntu-latest
174175
name: Finalize Codacy coverage report
176+
if: ${{ github.event.pull_request.head.repo.full_name == 'yoanm/symfony-jsonrpc-http-server' }}
175177
needs: [ tests ]
176178
steps:
177179
- name: Setup cache
@@ -199,7 +201,7 @@ jobs:
199201
env:
200202
COMPOSER_OPTIONS: '--optimize-autoloader --ignore-platform-req=php+'
201203
continue-on-error: true
202-
needs: [ static-checks, finalize-codacy-coverage-report ]
204+
needs: [ static-checks, tests ]
203205
strategy:
204206
fail-fast: false
205207
max-parallel: 4

0 commit comments

Comments
 (0)