Skip to content

Commit ad1e908

Browse files
committed
Coveralls.
1 parent 29fc412 commit ad1e908

File tree

5 files changed

+342
-2
lines changed

5 files changed

+342
-2
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@ jobs:
3030
run: |
3131
pnpm install
3232
pnpm run test
33+
- name: Coverage
34+
run: |
35+
pnpm exec nyc report --reporter=lcov
36+
- name: Report coveralls
37+
run: |
38+
curl -sL https://coveralls.io/coveralls-linux.tar.gz | tar -xz
39+
./coveralls report ./coverage/lcov.info
40+
env:
41+
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3342
publish:
3443
if: startsWith(github.ref, 'refs/tags/')
3544
needs:

.nycrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"all": true,
3+
"include": [
4+
"src/**/*.ts"
5+
]
6+
}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[![npm](https://github.com/voxelstack/ceres/actions/workflows/npm.yml/badge.svg)](https://www.npmjs.com/package/@voxelstack/ceres)
22
[![Documentation Status](https://readthedocs.org/projects/voxelstackceres/badge/?version=latest)](https://voxelstackceres.readthedocs.io/en/latest/)
3+
[![Coverage Status](https://coveralls.io/repos/github/voxelstack/ceres/badge.svg?branch=rewrite)](https://coveralls.io/github/voxelstack/ceres?branch=rewrite)
34

45
# ceres
56

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
"compile:web": "node ./esbuild.js",
2323
"compile:web:watch": "node ./esbuild.js --watch",
2424
"compile": "run-p compile:ts compile:web",
25-
"test": "cross-env TSX_TSCONFIG_PATH=./test/tsconfig.json mocha",
26-
"test:watch": "cross-env TSX_TSCONFIG_PATH=./test/tsconfig.json mocha --watch",
25+
"test": "cross-env TSX_TSCONFIG_PATH=./test/tsconfig.json nyc mocha",
26+
"test:watch": "cross-env TSX_TSCONFIG_PATH=./test/tsconfig.json nyc mocha --watch",
2727
"format": "prettier . --check",
2828
"lint": "eslint ./src ./test"
2929
},
@@ -39,6 +39,7 @@
3939
"@types/sinon-chai": "^4.0.0",
4040
"chai": "^6.2.2",
4141
"chai-dom": "^1.12.1",
42+
"coveralls": "^3.1.1",
4243
"cross-env": "^10.1.0",
4344
"esbuild": "^0.27.2",
4445
"eslint": "^9.39.2",

0 commit comments

Comments
 (0)