ci: add unit test workflow with coverage thresholds and lint fixes#97
Merged
ci: add unit test workflow with coverage thresholds and lint fixes#97
Conversation
Add GitHub Actions CI workflow that runs build, lint, and tests with coverage on PRs. Align ESLint config with CHT standards by adding eslint-plugin-n, eslint-plugin-promise, and no-only-tests. Fix all pre-existing lint errors and warnings.
|
Hareet
approved these changes
Apr 30, 2026
Member
Hareet
left a comment
There was a problem hiding this comment.
LGTM!
Summary
● Confirmed: no-only-tests rule is correctly wired — fired with describe.only not permitted error. File reverted, no diff. Test plan scenario passes.
Coverage vs thresholds (.nycrc.json):
┌────────────┬────────┬───────────┐
│ Metric │ Result │ Threshold │
├────────────┼────────┼───────────┤
│ Statements │ 96.82% │ 95 ✓ │
├────────────┼────────┼───────────┤
│ Branches │ 86.13% │ 85 ✓ │
├────────────┼────────┼───────────┤
│ Functions │ 100% │ 95 ✓ │
├────────────┼────────┼───────────┤
│ Lines │ 96.77% │ 95 ✓ │
└────────────┴────────┴───────────┘
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
unit_tests.yml) that runs build, lint, and test with coverage on every PR to main.nycrc.jsonwith coverage thresholds: 95% statements/lines/functions, 85% brancheseslint-plugin-n(Node.js rules),eslint-plugin-promise, andeslint-plugin-no-only-testscoverage/from ESLint, allowrequire()in tests (proxyquire), resolveno-explicit-anywarnings@typescript-eslint/eslint-pluginand@typescript-eslint/parserto latest v8 (8.58.2)Test plan
no-only-testsrule catches accidentalit.only()/describe.only()in testsnpm run lintpasses locally with 0 errors and 0 warnings