fix: failed to check inside github action#914
Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
|
This fix looks feasible, but it loses the advantage of oxlint's special customized report output on GitHub Actions. |
|
@Boshen I will first merge this fix to address the current issue where the vp check command is unavailable. Then I'll submit an issue to follow up on a better solution. |
There was a problem hiding this comment.
Pull request overview
This PR fixes vp check behaving incorrectly under GitHub Actions by ensuring oxlint emits the human-readable summary that vp check parses, and adds a snapshot test covering the GitHub Actions environment.
Changes:
- Force oxlint to use the
defaultformatter duringvp checklinting to keep parseable/stable summary output even whenGITHUB_ACTIONS=true. - Add a new snap-test case that runs
vp checkwithGITHUB_ACTIONS=trueto prevent regressions.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/cli/binding/src/cli.rs | Forces vp check’s lint step to pass --format=default to oxlint so summary parsing works in GitHub Actions. |
| packages/cli/snap-tests/check-pass-typecheck-github-actions/vite.config.ts | New snap-test config enabling type-aware/type-check linting. |
| packages/cli/snap-tests/check-pass-typecheck-github-actions/steps.json | New snap-test steps setting GITHUB_ACTIONS=true and running vp check. |
| packages/cli/snap-tests/check-pass-typecheck-github-actions/src/index.js | New minimal source file for the snap-test fixture. |
| packages/cli/snap-tests/check-pass-typecheck-github-actions/snap.txt | Expected snapshot output for the GitHub Actions scenario. |
| packages/cli/snap-tests/check-pass-typecheck-github-actions/package.json | New snap-test fixture package manifest. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixes voidzero-dev/setup-vp#7
I'm unsure whether we can produce good terminal output while retaining the GitHub reporter. If my fix is off course, please feel free to close this PR.