Skip to content

Prevent fork PRs from failing the tests job on workshop coverage publish - #378

Merged
piyushroshan merged 3 commits into
developfrom
copilot/fix-failing-github-actions-tests
Sep 9, 2026
Merged

Prevent fork PRs from failing the tests job on workshop coverage publish#378
piyushroshan merged 3 commits into
developfrom
copilot/fix-failing-github-actions-tests

Conversation

Copilot AI commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

The tests job was failing after successful test execution because the workshop coverage publishing step attempted to write back to GitHub from a forked pull_request run. In that context, GITHUB_TOKEN lacks the required permissions and orgoro/coverage exits with Resource not accessible by integration.

  • Root cause

    • The failure was not in Java/Go/Python/Node test execution.
    • The failing step was Publish Coverage for workshop, which runs orgoro/coverage@v3.2 and requires write-capable GitHub API access.
  • Workflow change

    • Added a guard so the coverage publish step runs only when:
      • the event is not pull_request, or
      • the pull request originates from the same repository
    • Fork PRs still run the actual tests and coverage generation; they only skip the write-back step that cannot succeed with restricted credentials.
  • Effect

    • Keeps coverage publication for trusted/internal contexts.
    • Prevents false-negative CI failures on external contributor PRs.
- name: Publish Coverage for workshop
  uses: orgoro/coverage@v3.2
  if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
  with:
    coverageFile: services/workshop/coverage.xml
    token: ${{ secrets.GITHUB_TOKEN }}

Co-authored-by: piyushroshan <1090436+piyushroshan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job tests Prevent fork PRs from failing the tests job on workshop coverage publish Sep 9, 2026
Copilot AI requested a review from piyushroshan September 9, 2026 03:10
@piyushroshan
piyushroshan marked this pull request as ready for review September 9, 2026 03:20
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Test Results

98 tests   98 ✅  2s ⏱️
18 suites   0 💤
 8 files     0 ❌

Results for commit f8fe62b.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
1363 1089 80% 0% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: f8fe62b by action🐍

@piyushroshan
piyushroshan merged commit b5fc307 into develop Sep 9, 2026
10 checks passed
@piyushroshan
piyushroshan deleted the copilot/fix-failing-github-actions-tests branch September 9, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants