[architect] unit tests exist but are never run in CI — deploy-gh-pages.yml missing test:unit step
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
## Architecture Finding
**Type**: missing-ci-gate
**Affected area**: .github/workflows/deploy-gh-pages.yml, tests/
Six unit test files exist under `tests/`:
- `tests/validate-architecture-assets.test.mjs`
- `tests/validate-architectures.test.mjs`
- `tests/validate-awards.test.mjs`
- `tests/validate-button-contrast.test.mjs`
- `tests/validate-metrics.test.mjs`
- `tests/validators-smoke.test.mjs`
`package.json` has `"test:unit": "node --test"` and `"test": "npm run check && npm run test:unit"`. However, neither `deploy-gh-pages.yml` nor any other CI workflow invokes `test:unit`. The `validate:*` scripts are called individually but the test suite that validates those validators is never executed in CI.
## Impact
Regressions in any validator can merge undetected. The test scaffolding gives false confidence — contributors can break `validate-awards` logic and CI will still pass as long as the script doesn't crash on the fixture data.
## Recommendation
Add a `Run unit tests` step to `deploy-gh-pages.yml` (and `import-architectures.yml` for consistency) immediately before the existing `Validate generated metrics` step:
```yaml
- name: Run unit tests
run: npm run test:unit
```
This is a one-line change with no new dependencies.
---
*Filed by architect agent (ACMM L6 — full mode)*
Contributor guide
Research direction
Start with .github/workflows/deploy-gh-pages.yml and import-architectures.yml, then review the existing Validate generated metrics steps and package.json's test:unit script. Run npm run test:unit locally and add the unit-test step immediately before metrics validation in both workflows. Done means CI executes all tests under tests/ before validating generated metrics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, javascript
- Domain
- ci-cd, testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100