Create node.js.yml#36
Conversation
|
@copilot |
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions workflow intended to run Node.js CI on pushes and pull requests targeting main.
Changes:
- Introduces
.github/workflows/node.js.ymlto install dependencies, build, and run tests across a Node.js version matrix.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - run: npm ci | ||
| - run: npm run build --if-present | ||
| - run: npm test |
| cache: 'npm' | ||
| - run: npm ci | ||
| - run: npm run build --if-present | ||
| - run: npm test |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@copilot apply changes based on the comments in this thread |
1 similar comment
|
@copilot apply changes based on the comments in this thread |
|
@copilot |
|
@copilot apply changes based on the comments in this thread |
There was a problem hiding this comment.
Thanks @dofaromg for the contribution. Please add a proper PR description explaining what was added, why the workflow is needed and what problem it solves.
Also the current workflow will fail because npm commands are being executed from the repository root, while this project uses separate frontend and backend directories.
|
@copilot apply changes based on the comments in this thread |
3 similar comments
|
@copilot apply changes based on the comments in this thread |
|
@copilot apply changes based on the comments in this thread |
|
@copilot apply changes based on the comments in this thread |
Akash504-ai
left a comment
There was a problem hiding this comment.
I checked the changes again, but there’s still one issue remaining. Right now the workflow commands are still running from the repository root:
- run: npm ci
- run: npm run build --if-present
- run: npm testThis repo has separate frontend and backend folders, so these commands will fail unless there’s a root-level package.json.
Please create separate jobs for frontend/backend (or use working-directory for each). Also, npm test should use --if-present if no test script exists yet.
No description provided.