Yanghanrui666 opened a new issue, #4139:
URL: https://github.com/apache/rocketmq-dashboard/issues/4139
## Problem
The `frontend-build` job in `.github/workflows/ci.yml` runs `npm ci`
followed by `npm run build` but **never runs `npm run test`** (vitest). This
means the repo's roughly 936 frontend unit tests do not gate any PR or push to
`rocketmq-studio`.
A test suite that is not enforced by CI provides no regression protection -
a breaking change can be merged without any test failure.
## Current state
```yaml
frontend-build:
name: Frontend Build (Node 20)
steps:
- run: npm ci
- run: npm run build # only type-checks and bundles
```
The `test` script is defined in `web/package.json`:
```json
"test": "vitest run"
```
## Proposed change
Add a `npm run test` step to the `frontend-build` job, after install and
before (or after) the build step:
```yaml
- name: Run frontend tests
run: npm run test
```
This is a one-line addition. It depends on #4136 (CI startup fix) being
merged first, otherwise the workflow still fails at startup and no jobs run at
all.
## Impact
- Every PR that touches frontend code will have its unit tests enforced.
- Flaky tests (maintainer noted two are already flaky) may need attention,
but that is a separate issue - ignoring tests entirely is worse.
- The CI runtime will increase by the vitest execution time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]