-
Notifications
You must be signed in to change notification settings - Fork 0
Add CI workflows for build, lint, and tests #2
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
Add CI workflows for build, lint, and tests #2
Conversation
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.
Pull Request Overview
This PR introduces CI workflows for automated building, linting with Prettier, and running Vitest, and pins the project to a specific Yarn version.
- Add a
packageManagerfield inpackage.jsonto enforce Yarn 1.22.22. - Create a
Testworkflow (.github/workflows/test.yml) to run Vitest on pushes and PRs. - Create a
Build and Lintworkflow (.github/workflows/build.yml) to run Prettier checks and build on pushes and PRs.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| package.json | Added packageManager entry for consistent Yarn use. |
| .github/workflows/test.yml | New workflow to install deps and run Vitest tests. |
| .github/workflows/build.yml | New workflow to install deps, check Prettier, and build. |
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' |
Copilot
AI
Jun 6, 2025
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.
Node version '22' may not be supported on the hosted runner; consider using a published LTS like '18.x' or '20.x'.
| node-version: '22' | |
| node-version: '20.x' |
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' |
Copilot
AI
Jun 6, 2025
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.
Node version '22' may not be supported on the hosted runner; consider using a published LTS like '18.x' or '20.x'.
| node-version: '22' | |
| node-version: '20' |
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 |
Copilot
AI
Jun 6, 2025
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.
[nitpick] The checkout, setup-node, and install steps are duplicated across workflows. Consider extracting them into a reusable workflow or composite action to reduce repetition.
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 |
Copilot
AI
Jun 6, 2025
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.
[nitpick] The checkout, setup-node, and install steps are duplicated across workflows. Consider extracting them into a reusable workflow or composite action to reduce repetition.
Summary
Testing
yarn prettier --check .yarn vitest run --passWithNoTestshttps://chatgpt.com/codex/tasks/task_e_6842ce9203e4832690dcbd5a4fc87329