Skip to content

Call CI workflow before publish attempt#2016

Open
Andarist wants to merge 2 commits into
nextfrom
run-ci-before-publish
Open

Call CI workflow before publish attempt#2016
Andarist wants to merge 2 commits into
nextfrom
run-ci-before-publish

Conversation

@Andarist
Copy link
Copy Markdown
Member

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.

@Andarist Andarist requested review from bluwy and emmatown as code owners May 16, 2026 13:20
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 16, 2026

⚠️ No Changeset found

Latest commit: a55615b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package "@changesets/apply-release-plan" depends on the ignored package "@changesets/test-utils", but "@changesets/apply-release-plan" is not being ignored. Please add "@changesets/apply-release-plan" to the `ignore` option.
The package "@changesets/cli" depends on the ignored package "@changesets/test-utils", but "@changesets/cli" is not being ignored. Please add "@changesets/cli" to the `ignore` option.
The package "@changesets/config" depends on the ignored package "@changesets/test-utils", but "@changesets/config" is not being ignored. Please add "@changesets/config" to the `ignore` option.
The package "@changesets/get-dependents-graph" depends on the ignored package "@changesets/test-utils", but "@changesets/get-dependents-graph" is not being ignored. Please add "@changesets/get-dependents-graph" to the `ignore` option.
The package "@changesets/git" depends on the ignored package "@changesets/test-utils", but "@changesets/git" is not being ignored. Please add "@changesets/git" to the `ignore` option.
The package "@changesets/pre" depends on the ignored package "@changesets/test-utils", but "@changesets/pre" is not being ignored. Please add "@changesets/pre" to the `ignore` option.
The package "@changesets/read" depends on the ignored package "@changesets/test-utils", but "@changesets/read" is not being ignored. Please add "@changesets/read" to the `ignore` option.
The package "@changesets/release-utils" depends on the ignored package "@changesets/test-utils", but "@changesets/release-utils" is not being ignored. Please add "@changesets/release-utils" to the `ignore` option.
The package "@changesets/should-skip-package" depends on the ignored package "@changesets/test-utils", but "@changesets/should-skip-package" is not being ignored. Please add "@changesets/should-skip-package" to the `ignore` option.
The package "@changesets/write" depends on the ignored package "@changesets/test-utils", but "@changesets/write" is not being ignored. Please add "@changesets/write" to the `ignore` option.
The package "@changesets/cli" depends on the ignored package "@changesets/color", but "@changesets/cli" is not being ignored. Please add "@changesets/cli" to the `ignore` option.
The package "@changesets/get-dependents-graph" depends on the ignored package "@changesets/color", but "@changesets/get-dependents-graph" is not being ignored. Please add "@changesets/get-dependents-graph" to the `ignore` option.
The package "@changesets/logger" depends on the ignored package "@changesets/color", but "@changesets/logger" is not being ignored. Please add "@changesets/logger" to the `ignore` option.

@Andarist Andarist requested a review from beeequeue May 16, 2026 13:20
@codecov
Copy link
Copy Markdown

codecov Bot commented May 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.93%. Comparing base (dfa1d96) to head (a55615b).
⚠️ Report is 1 commits behind head on next.

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.
📢 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.

Comment thread .github/workflows/ci.yml
Comment on lines +46 to +55
ci:
if: needs.version.outputs.hasChangesets == 'false'
needs: version
permissions:
contents: read
uses: ./.github/workflows/ci.yml

publish:
name: Publish
needs: ci
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

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