Skip to content

Commit dc5de69

Browse files
authored
bring back coverage (#294)
* bring back coverage * add script and only count for src files * lint
1 parent 0dbbaa8 commit dc5de69

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ jobs:
3636
run: npm ci
3737

3838
- name: Run tests
39-
run: npm run test -- --ci --runInBand
39+
run: npm run coverage -- --ci --runInBand
40+
41+
- name: Upload code coverage
42+
uses: coverallsapp/github-action@master
43+
with:
44+
github-token: ${{ secrets.GITHUB_TOKEN }}
4045

4146
test-earliest-node-engine-support:
4247
runs-on: ubuntu-latest

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
[![Version][version-badge]][version-link]
66
[![npm][npm-badge]][npm-link]
77
[![Test CI][ci-badge]][ci-link]
8+
[![Coverage Status][coverage-badge]][coverage-link]
89
[![License][license-badge]][license-link]
910
[![Docs][docs-badge]][docs-link]
1011

@@ -217,6 +218,8 @@ See [the contributing guide](./.github/contributing.md) for detailed instruction
217218
[npm-link]: https://www.npmjs.com/package/@opensea/stream-js
218219
[ci-badge]: https://github.com/ProjectOpenSea/stream-js/actions/workflows/ci.yml/badge.svg
219220
[ci-link]: https://github.com/ProjectOpenSea/stream-js/actions/workflows/ci.yml
221+
[coverage-badge]: https://coveralls.io/repos/github/ProjectOpenSea/stream-js/badge.svg?branch=main
222+
[coverage-link]: https://coveralls.io/github/ProjectOpenSea/stream-js?branch=main
220223
[license-badge]: https://img.shields.io/github/license/ProjectOpenSea/stream-js
221224
[license-link]: https://github.com/ProjectOpenSea/stream-js/blob/main/LICENSE
222225
[docs-badge]: https://img.shields.io/badge/Stream.js-documentation-informational

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"scripts": {
2020
"build": "microbundle",
2121
"check-types": "tsc --noEmit",
22+
"coverage": "npm run test -- --coverage --collectCoverageFrom='./src/**'",
2223
"dev": "microbundle watch",
2324
"eslint": "eslint . --max-warnings 0 --ext .js,.ts --fix",
2425
"lint:check": "concurrently \"npm run check-types\" \"npm run eslint\" \"npm run prettier:check\" \"npm run prettier:check:package.json\"",

0 commit comments

Comments
 (0)