Conversation
This workflow sets up the environment for Copilot, including Node.js, dependencies, Prisma client generation, database seeding, type checking, and caching for Playwright and Next.js.
|
👋 Thanks for opening your first pull request in StormCom! A maintainer will review your PR soon. Please make sure:
We appreciate your contribution to making StormCom better! 🚀 |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| # Engines: Node >=20, npm >=10 | ||
| - name: Set up Node 20 | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "20" |
There was a problem hiding this comment.
According to the coding guidelines, Node.js version should be 18.x or higher, but the project specifically targets 18.x. The workflow uses Node 20, which may introduce compatibility issues. Consider using Node 18 to match the documented tech stack requirement.
| # Engines: Node >=20, npm >=10 | |
| - name: Set up Node 20 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| # Engines: Node >=18, npm >=10 | |
| - name: Set up Node 18 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "18" |
| - name: Type check | ||
| run: npm run type-check | ||
|
|
||
| - name: Save type-check errors to JSON (PowerShell script with Linux fallback) |
There was a problem hiding this comment.
The comment indicates PowerShell with Linux fallback, but the implementation shows the opposite: it attempts npm script first, then falls back to PowerShell. On ubuntu-latest, PowerShell may not be available by default. The logic should either be corrected or the comment updated to accurately reflect 'npm script with PowerShell fallback'.
| - name: Save type-check errors to JSON (PowerShell script with Linux fallback) | |
| - name: Save type-check errors to JSON (npm script with PowerShell fallback) |
| (npm run dev & echo $! > /tmp/next_pid) || true | ||
| sleep 15 || true | ||
| if [ -f /tmp/next_pid ]; then | ||
| kill $(cat /tmp/next_pid) || true |
There was a problem hiding this comment.
The PID capture logic is flawed. If 'npm run dev' fails immediately, the shell will still execute 'echo $! > /tmp/next_pid' with the PID of the failed subshell. The kill command on line 105 should verify the process exists before attempting to kill it, or use 'kill -0' to check process existence first.
| kill $(cat /tmp/next_pid) || true | |
| NEXT_PID=$(cat /tmp/next_pid) | |
| if kill -0 "$NEXT_PID" 2>/dev/null; then | |
| kill "$NEXT_PID" || true | |
| fi |
This pull request adds a new GitHub Actions workflow for setting up the Copilot development environment. The workflow automates environment setup, dependency installation, database preparation, type checking, and caching to streamline local and CI development.
New Copilot setup workflow:
.github/workflows/copilot-setup-steps.yml, a comprehensive workflow that:Description
Why
Fixes #
Related to #
What
Type of Change
Please check the relevant option(s):
Checklist
Please ensure your PR meets the following requirements:
Code Quality
npm run format)npm run lint)npm run type-check)anytypes used (except for documented third-party library interfaces)Testing
npm run test)Security & Best Practices
Documentation
Database (if applicable)
Accessibility (if UI changes were made)
Performance (if applicable)
Build & Deployment
npm run build)Screenshots (if applicable)
Before
After
Additional Context
Reviewer Notes
By submitting this pull request, I confirm that: