chore: add real badges and wire up codecov (#127)

- Replace the static fake coverage badge with codecov.
- Add npm version and bundlephobia bundle-size badges.
- Add test:coverage script and lcov reporter so CI can upload.
- Add a coverage job in CI that uploads to codecov on Node 20.

Requires CODECOV_TOKEN secret to be set in the repo for the badge to
populate; until then the badge will display "unknown".
This commit is contained in:
JackChen 2026-04-19 18:00:23 +08:00 committed by GitHub
parent 7adb065ea3
commit e5c82bb0d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 26 additions and 4 deletions

View File

@ -21,3 +21,19 @@ jobs:
- run: rm -f package-lock.json && npm install
- run: npm run lint
- run: npm test
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: rm -f package-lock.json && npm install
- run: npm run test:coverage
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
fail_ci_if_error: false

View File

@ -4,10 +4,12 @@ The lightweight multi-agent orchestration engine for TypeScript. Three runtime d
CrewAI is Python. LangGraph makes you draw the graph by hand. `open-multi-agent` is the `npm install` you drop into an existing Node.js backend when you need a team of agents to work on a goal together. Nothing more, nothing less.
[![npm version](https://img.shields.io/npm/v/@jackchen_me/open-multi-agent)](https://www.npmjs.com/package/@jackchen_me/open-multi-agent)
[![GitHub stars](https://img.shields.io/github/stars/JackChen-me/open-multi-agent)](https://github.com/JackChen-me/open-multi-agent/stargazers)
[![license](https://img.shields.io/github/license/JackChen-me/open-multi-agent)](./LICENSE)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.6-blue)](https://www.typescriptlang.org/)
[![coverage](https://img.shields.io/badge/coverage-85%25-brightgreen)](https://github.com/JackChen-me/open-multi-agent/actions)
[![bundle size](https://img.shields.io/bundlephobia/minzip/@jackchen_me/open-multi-agent)](https://bundlephobia.com/package/@jackchen_me/open-multi-agent)
[![codecov](https://codecov.io/gh/JackChen-me/open-multi-agent/graph/badge.svg)](https://codecov.io/gh/JackChen-me/open-multi-agent)
**English** | [中文](./README_zh.md)
@ -456,7 +458,7 @@ Issues, feature requests, and PRs are welcome. Some areas where contributions wo
## Contributors
<a href="https://github.com/JackChen-me/open-multi-agent/graphs/contributors">
<img src="https://contrib.rocks/image?repo=JackChen-me/open-multi-agent&max=20&v=20260411" />
<img src="https://contrib.rocks/image?repo=JackChen-me/open-multi-agent&max=20&v=20260419" />
</a>
## Star History

View File

@ -4,10 +4,12 @@ TypeScript 里的轻量多智能体编排引擎。3 个运行时依赖,零配
CrewAI 是 Python。LangGraph 要你自己画图。`open-multi-agent` 是你现有 Node.js 后端里 `npm install` 一下就能用的那一层:一支 agent 团队围绕一个目标协作,就这些。
[![npm version](https://img.shields.io/npm/v/@jackchen_me/open-multi-agent)](https://www.npmjs.com/package/@jackchen_me/open-multi-agent)
[![GitHub stars](https://img.shields.io/github/stars/JackChen-me/open-multi-agent)](https://github.com/JackChen-me/open-multi-agent/stargazers)
[![license](https://img.shields.io/github/license/JackChen-me/open-multi-agent)](./LICENSE)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.6-blue)](https://www.typescriptlang.org/)
[![coverage](https://img.shields.io/badge/coverage-85%25-brightgreen)](https://github.com/JackChen-me/open-multi-agent/actions)
[![bundle size](https://img.shields.io/bundlephobia/minzip/@jackchen_me/open-multi-agent)](https://bundlephobia.com/package/@jackchen_me/open-multi-agent)
[![codecov](https://codecov.io/gh/JackChen-me/open-multi-agent/graph/badge.svg)](https://codecov.io/gh/JackChen-me/open-multi-agent)
[English](./README.md) | **中文**
@ -451,7 +453,7 @@ Issue、feature request、PR 都欢迎。特别想要:
## 贡献者
<a href="https://github.com/JackChen-me/open-multi-agent/graphs/contributors">
<img src="https://contrib.rocks/image?repo=JackChen-me/open-multi-agent&max=20&v=20260411" />
<img src="https://contrib.rocks/image?repo=JackChen-me/open-multi-agent&max=20&v=20260419" />
</a>
## Star 趋势

View File

@ -29,6 +29,7 @@
"dev": "tsc --watch",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"lint": "tsc --noEmit",
"test:e2e": "RUN_E2E=1 vitest run tests/e2e/",
"prepublishOnly": "npm run build"

View File

@ -4,6 +4,7 @@ export default defineConfig({
test: {
coverage: {
include: ['src/**'],
reporter: ['text', 'html', 'lcov', 'json'],
},
exclude: [
'**/node_modules/**',