Conversation
This workflow is an almost exact copy of the `build.yml` workflow that will run on pull requests. It checks out the repo a step earlier so it can be used as the source for the action. This will ensure that on pull requests we verify that the action functions as expected. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new GitHub Actions workflow (verify.yml) to validate this repository’s GitHub Action behavior on pull requests by running the pipeline against the checked-out (local) copy of the action, rather than a released tag.
Changes:
- Introduces a new
verifyworkflow triggered onpull_requestandmerge_group. - Runs a lint/verification job that checks out the repo, runs the local action (
uses: ./), installs toolchains, and executespre-commit.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Instead of replicating the `build.yml` workflow we do direct verification using actions/github-script. This will now load the tool versions from the action source and compare them to the outputs from running the action.
There was a problem hiding this comment.
Pull request overview
Adds a dedicated GitHub Actions workflow to verify this repository’s action behavior on PRs/merge-queue runs by executing the checked-out action and validating its outputs.
Changes:
- Introduces
.github/workflows/verify.ymltriggered onpull_requestandmerge_group. - Runs the local action (
uses: ./) and validates that output<tool>-versionvalues matchsrc/versions.js.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Add steps to the `verify` job to build the action and verify that there are no changes. This will ensure that dist/ is up-to-date with changes in src/ when verifying. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Giving useful names to each step when verifying will make it easier when examining the log during a failure.
Add a `paths` configuration to the `pull_request` trigger for the workflow. This will ensure the workflow only runs when there are changes to itself or the functionality of the action.
I think it is cleaner to use template literals for string interpolation instead of all the concatenation currently being done.
This ensures that a failed output key check can not be double counted as improving the output for a value mismatch. Though the latter is unlikely to happen with our specific setup it is an easy enough change as a "just in case" thing. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Manually format the inline JavaScript in the `verify.yml` workflow with the prettier pre-commit hook. This was done by pulling the code out into a separate file and running pre-commit against that file.
There was a problem hiding this comment.
Pull request overview
This pull request adds a new GitHub Actions workflow (verify.yml) to validate that the action behaves as expected on pull requests and merge-queue checks, including ensuring generated dist/ artifacts are consistent with src/.
Changes:
- Adds a
verifyworkflow that runs the action from the local checkout and validates its outputs. - Builds the action (
npm ci+npm run package) and checks thatdist/is up-to-date.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This eliminates some wrangling about line-length in the inline script used in the `verify.yml` workflow.
Adjust the check so it catches any changes in the dist/ sub-directory after running `npm run package`. This will ensure that untracked files cause failure in addition to changes to tracked files. This is important since untracked files would usually be the result of new files created in dist/ from the source code in src/. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
🗣 Description
This pull request adds a
verify.ymlGitHub Actions workflow. This workflow will run on pull requests to verify the action's functionality.💭 Motivation and context
This was mentioned during review by Copilot in #107 (comment). It seemed like a good idea so I have implemented it here.
🧪 Testing
Automated tests pass.
✅ Pre-approval checklist
✅ Pre-merge checklist
verifycheck to the required checks in branch protection.