Skip to content

add GHA workflow that runs tests and coverage only on fork PRs - #3195

Merged
valeriupredoi merged 8 commits into
mainfrom
codecov_gha
Aug 12, 2026
Merged

add GHA workflow that runs tests and coverage only on fork PRs#3195
valeriupredoi merged 8 commits into
mainfrom
codecov_gha

Conversation

@valeriupredoi

@valeriupredoi valeriupredoi commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

Closes #3181

This is in response to @schlunma 's suggestion to have coverage reporting for forked PRs - which is in essence a very useful thing to have; given the token limitations described in the issue, this may be the only viable solution on the back of our current infrastructure, and not using some dodgy GH action from some bloke's repo; the only caveat is that this means the developer will have tests running in their fork PR, but I minimized the amount of testing done to only the latest Python. Note that we explicitly turn off tests in forked PRs in our regular GHAs so this is a bit of a U-turn.

Live testing via dummy forked PR #3196 and this action behaves as per specs, flagging _ducky.py as missing coverage 🦆


Before you get started

Checklist

It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.


To help with the number pull requests:

@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.48%. Comparing base (0be672e) to head (2dcd7ec).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3195      +/-   ##
==========================================
- Coverage   96.49%   96.48%   -0.01%     
==========================================
  Files         280      280              
  Lines       16282    16282              
==========================================
- Hits        15711    15710       -1     
- Misses        571      572       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@valeriupredoi

Copy link
Copy Markdown
Contributor Author

@schlunma you have a full solution here, bud. Though I'd still like this to be approved by @bouweandela also if you don't mind, this is a U-turn from our decision to have minimal or no testing done in forks. 🍺

@schlunma schlunma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks V, that's awesome!! Got a couple of comments, but I think this is the way to go! 🚀

test:
runs-on: ${{ matrix.os }}
# run action ONLY on a fork PR
if: github.event.pull_request.head.repo.full_name != github.repository

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we also use this workflow for PRs from our repo instead of the Codecov orb on CircleCI? This would make it more consistent

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes indeed we could, @bouweandela initially configured Codecov through CircleCI but we can always switch to GHAs instead, I have Codecov running through GHAs in other repos and it's doing very well 😃

Comment thread .github/workflows/run-tests-fork.yml Outdated
Comment thread .github/workflows/run-tests-fork.yml Outdated
Comment thread .github/workflows/run-tests-fork.yml Outdated
@valeriupredoi

Copy link
Copy Markdown
Contributor Author

@schlunma your comments encapsulated in cb36d7b

@schlunma schlunma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great, thanks V! 🚀

Just a tiny comment left: there's no need to use a matrix here.

Comment thread .github/workflows/run-tests-fork.yml Outdated
Comment thread .github/workflows/run-tests-fork.yml Outdated
Comment thread .github/workflows/run-tests-fork.yml Outdated
Comment thread .github/workflows/run-tests-fork.yml Outdated
valeriupredoi and others added 5 commits August 12, 2026 14:15
Co-authored-by: Manuel Schlund <32543114+schlunma@users.noreply.github.com>
Co-authored-by: Manuel Schlund <32543114+schlunma@users.noreply.github.com>
Co-authored-by: Manuel Schlund <32543114+schlunma@users.noreply.github.com>
@valeriupredoi

Copy link
Copy Markdown
Contributor Author

very many thanks for the review Manu 🍻

@valeriupredoi
valeriupredoi merged commit 6f03e55 into main Aug 12, 2026
6 checks passed
@valeriupredoi
valeriupredoi deleted the codecov_gha branch August 12, 2026 13:35
@valeriupredoi

Copy link
Copy Markdown
Contributor Author

BTW I decided to merge now and not ask for Bouwe's review anymore since we decided to make the action very very light, so it's not really a contradiction of our decision to not have stuff run in forks

@schlunma

Copy link
Copy Markdown
Contributor

Didn't you wanna wait for @bouweandela's approval? 😄

@valeriupredoi

Copy link
Copy Markdown
Contributor Author

Didn't you wanna wait for @bouweandela's approval? 😄

shh 🤫 He don't know about this 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codecov is not run in forks

2 participants