Call CI workflow before publish attempt#2016
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #2016 +/- ##
=======================================
Coverage 80.93% 80.93%
=======================================
Files 54 54
Lines 2360 2360
Branches 724 724
=======================================
Hits 1910 1910
Misses 408 408
Partials 42 42 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| ci: | ||
| if: needs.version.outputs.hasChangesets == 'false' | ||
| needs: version | ||
| permissions: | ||
| contents: read | ||
| uses: ./.github/workflows/ci.yml | ||
|
|
||
| publish: | ||
| name: Publish | ||
| needs: ci |
There was a problem hiding this comment.
Should we set up like this instead? https://stackoverflow.com/a/64733705
Otherwise ci.yml is going to be executed twice from a push event, and possibly cancel because of the concurrency setup.
There was a problem hiding this comment.
Should we set up like this instead? https://stackoverflow.com/a/64733705
I'm not sure if this would work because we rely on merge_group now and they kinda fire before stuff lands on main. But either way, decoupling it like this would be a little bit implicit (or at least not as discoverable) - which would hurt DX a little bit because the changeset workflow would always be "delayed".
Otherwise ci.yml is going to be executed twice from a push event, and possibly cancel because of the concurrency setup.
Good point about concurrency - I don't quite know how that would work in this special mode. This needs testing.
I'm fine with the CI workflow executing more than once in those scenarios though because it would only happen pre-publish (but not pre-version)
There was a problem hiding this comment.
I think we'll have to figure out the concurrency issue. I also think this will trigger often than not though because we execute when there's no changesets, not only before publish.
If we can get both sorted out I'm ok with doing this.
It always bothered me a little bit that the CI and publish workflows were disassociated from each other. This is mostly redundant now because only green PRs should end up on main/next and we have merge queues and all to verify that... but it's still kinda implicit.
Given the publish only happens from time to time, I think it would make sense to introduce this one extra re-verification step into the mix.