-
Notifications
You must be signed in to change notification settings - Fork 56
chore: Add tests and improve code coverage. #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
dcbae6e
chore: Add tests and improve coverage.
39cedaa
Merge pull request #3 from aakashH242/chore/add-unit-tests
aakashH242 407e51a
chore: Add tests and improve coverage.
e230324
Merge branch 'main' into chore/add-unit-tests
aakashH242 f58eaef
chore: Add tests and improve coverage. Skip end-to-end tests in CI pi…
6e585fd
Merge pull request #5 from aakashH242/chore/add-unit-tests-review
aakashH242 8e2718f
Merge branch 'hustcc:main' into main
aakashH242 bc9840a
chore: Rebase to latest.
ec96f5c
Merge branch 'hustcc:main' into main
aakashH242 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| # Quick CI Reference | ||
|
|
||
| ## What Runs on Push/PR | ||
|
|
||
| ```bash | ||
| 1. npm run lint # Code style check | ||
| 2. npm run test:coverage # Run all 169 tests | ||
| 3. Coverage check ≥ 90% # Enforce threshold | ||
| 4. npm run build # Build verification | ||
| ``` | ||
|
|
||
| ## CI Status Meanings | ||
|
|
||
| - ✅ **Green Check** - All passed, ready to merge | ||
| - ❌ **Red X** - Failed, needs fixing | ||
| - 🟡 **Yellow Dot** - Running, please wait | ||
| - ⚪ **Gray Dot** - Queued or skipped | ||
|
|
||
| ## Quick Fixes | ||
|
|
||
| ### Lint Failed | ||
| ```bash | ||
| npm run lint:fix | ||
| git add . | ||
| git commit -m "fix: lint errors" | ||
| git push | ||
| ``` | ||
|
|
||
| ### Tests Failed | ||
| ```bash | ||
| npm test | ||
| # Fix the failing tests | ||
| git add . | ||
| git commit -m "fix: failing tests" | ||
| git push | ||
| ``` | ||
|
|
||
| ### Coverage < 90% | ||
| ```bash | ||
| npm run test:coverage | ||
| # Check coverage/index.html | ||
| # Add tests for uncovered lines | ||
| git add . | ||
| git commit -m "test: increase coverage" | ||
| git push | ||
| ``` | ||
|
|
||
| ### Build Failed | ||
| ```bash | ||
| npm run build | ||
| # Fix TypeScript errors | ||
| git add . | ||
| git commit -m "fix: build errors" | ||
| git push | ||
| ``` | ||
|
|
||
| ## Local Pre-Push Checklist | ||
|
|
||
| ```bash | ||
| ✓ npm run lint # Passes? | ||
| ✓ npm run test:coverage # All green? | ||
| ✓ Coverage ≥ 90%? # Check report | ||
| ✓ npm run build # Compiles? | ||
| ``` | ||
|
|
||
| If all ✓, you're good to push! 🚀 | ||
|
|
||
| ## View CI Results | ||
|
|
||
| - **PR Page** - See check status at bottom | ||
| - **Actions Tab** - View detailed logs | ||
| - **Artifacts** - Download coverage reports | ||
|
|
||
| ## CI Workflow Location | ||
|
|
||
| `.github/workflows/ci.yml` | ||
|
|
||
| ## Need Help? | ||
|
|
||
| See [CI Setup Guide](.github/CI_SETUP.md) for detailed information. | ||
|
|
||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove all the markdown file, just add some guide in readme.md