Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm test
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Ci calls missing test 🐞 Bug ≡ Correctness

The workflow runs npm test, but package.json defines no test script, so CI will fail with
“Missing script: test” on every run. This makes the new workflow non-functional for the repository
as-is.
Agent Prompt
## Issue description
The workflow runs `npm test` but this repository has no `test` script in `package.json`, causing CI to fail.

## Issue Context
`package.json` currently defines `build`, `dev`, `format`, `serve`, and `start`, but not `test`.

## Fix Focus Areas
- .github/workflows/node.js.yml[29-31]
- package.json[5-11]

## Suggested fix
Pick one:
1) Add a `test` script to `package.json` (even a placeholder that exits 0 if tests are not applicable), or
2) Change the step to `npm test --if-present`, or
3) Remove the `npm test` step entirely if this repo intentionally has no tests.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Loading