-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add changeset validation workflow #3067
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c3ee4e6
add changeset validation workflow
karooolis 15fdd61
Update .github/workflows/changeset.yml
karooolis e578d33
Merge branch 'main' into kumpis/validate-changeset
karooolis 6f55edb
only run if files inside .changeset change
karooolis 1145fde
test changeset validation
karooolis 8fdc58f
test invalid changeset
karooolis c0d10fd
update workflow paths
karooolis 913d828
only run if .changeset is updated
karooolis 4f2bfcd
include all paths for changeet workflow
karooolis ad9745d
undo explorer description change
karooolis 3ca343f
only run on pull_request
karooolis 0a4022a
validate status from main
karooolis 012e117
validate workflow for invalid changeset
karooolis 5fc45e4
validate workflow for valid changeset
karooolis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Changeset | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
changeset: | ||
name: Validate changeset | ||
runs-on: depot-ubuntu-22.04-16 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Changeset | ||
run: pnpm changeset status --since origin/main | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have to do it like this due to base branch set as |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially, thought to run workflow only if .changeset/** changes but then realized that package.json of packages may change too, causing changeset validation to fail. So now including all paths, although could still narrow down to .changeset/** and packages/**/package.json?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds reasonable to run as-needed (just for changeset + package.json changes) although may also need to consider the
pnpm-workspace.yaml
(could change the scope what are considered workspace packages) and ~anypackage.json
(e.g.**/package.json
)but also running it for every commit is fine too, should be lightweight enough to not matter much
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps then best to not restrict any paths since it is indeed lightweight, and don't want to miss anything accidentally.