add GHA workflow that runs tests and coverage only on fork PRs - #3195
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
|
@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
left a comment
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Could we also use this workflow for PRs from our repo instead of the Codecov orb on CircleCI? This would make it more consistent
There was a problem hiding this comment.
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 😃
schlunma
left a comment
There was a problem hiding this comment.
Great, thanks V! 🚀
Just a tiny comment left: there's no need to use a matrix here.
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>
|
very many thanks for the review Manu 🍻 |
|
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 |
|
Didn't you wanna wait for @bouweandela's approval? 😄 |
shh 🤫 He don't know about this 😁 |
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.pyas 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: