Skip to content

Commit 36d9b77

Browse files
Add README coverage badge and PR coverage checks
Run the PR test workflow through npm run test:coverage and add a coverage badge in README so coverage status is visible from the repository page. Add c8 as a dev dependency and ignore generated .coverage/ and coverage/ artifacts to keep local coverage output out of commits. Normalize the c8 --include glob quoting in package.json so the pattern is parsed as intended during script execution. Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
1 parent edebfa2 commit 36d9b77

5 files changed

Lines changed: 460 additions & 133 deletions

File tree

.github/workflows/pr-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ jobs:
3434
with:
3535
node-version: 22
3636
- run: npm ci
37-
- run: npm test
37+
- run: npm run test:coverage
3838
- run: npm run lint
3939
- run: npm run build

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
.vscode/
33
node_modules/
44
build/
5+
.coverage/
6+
coverage/
57
.DS_Store
68
*.zip

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Deep ChatGPT integrations in your browser, completely for free.
1212
[![release][release-image]][release-url]
1313
[![size](https://img.shields.io/badge/minified%20size-390%20kB-blue)][release-url]
1414
[![verfiy][verify-image]][verify-url]
15+
[![coverage][coverage-image]][coverage-url]
1516

1617
English &nbsp;&nbsp;|&nbsp;&nbsp; [Indonesia](README_IN.md) &nbsp;&nbsp;|&nbsp;&nbsp; [简体中文](README_ZH.md) &nbsp;&nbsp;|&nbsp;&nbsp; [日本語](README_JA.md) &nbsp;&nbsp;|&nbsp;&nbsp; [Türkçe](README_TR.md)
1718

@@ -40,6 +41,10 @@ English &nbsp;&nbsp;|&nbsp;&nbsp; [Indonesia](README_IN.md) &nbsp;&nbsp;|&nbsp;&
4041

4142
[verify-url]: https://github.com/ChatGPTBox-dev/chatGPTBox/actions/workflows/verify-configs.yml
4243

44+
[coverage-image]: https://github.com/ChatGPTBox-dev/chatGPTBox/workflows/pr-tests/badge.svg
45+
46+
[coverage-url]: https://github.com/ChatGPTBox-dev/chatGPTBox/actions/workflows/pr-tests.yml
47+
4348
[Chrome-image]: https://img.shields.io/badge/-Chrome-brightgreen?logo=google-chrome&logoColor=white
4449

4550
[Chrome-url]: https://chrome.google.com/webstore/detail/chatgptbox/eobbhoofkanlmddnplfhnmkfbnlhpbbo

0 commit comments

Comments
 (0)