Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions workflow to run frontend linting, type-checking, unit tests, and upload coverage on pushes/PRs targeting main and dev.
Changes:
- Introduces a CI job matrix to test on Node.js 18 and 20.
- Runs
lint,typecheck, andtest:ciscripts. - Uploads Jest coverage output to Codecov.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/frontend-tests.yml
Outdated
| cache: "npm" | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run linting | ||
| run: npm run lint | ||
|
|
||
| - name: Run type checking | ||
| run: npm run typecheck | ||
|
|
||
| - name: Run tests with coverage | ||
| run: npm run test:ci |
There was a problem hiding this comment.
The workflow uses npm ci and cache: "npm", but the repo has a yarn.lock and no package-lock.json, so this job will fail (npm ci requires a lockfile). Align the workflow with the repo’s package manager (e.g., switch to Yarn with cache: "yarn" and yarn install --frozen-lockfile, or commit a package-lock.json and keep npm).
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run linting | |
| run: npm run lint | |
| - name: Run type checking | |
| run: npm run typecheck | |
| - name: Run tests with coverage | |
| run: npm run test:ci | |
| cache: "yarn" | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Run linting | |
| run: yarn lint | |
| - name: Run type checking | |
| run: yarn typecheck | |
| - name: Run tests with coverage | |
| run: yarn test:ci |
| name: Frontend Tests & Quality Checks | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main |
There was a problem hiding this comment.
Consider adding an explicit permissions: block (e.g., contents: read) to follow least-privilege defaults for this workflow, since it only needs to checkout and run tests/upload coverage.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.