Skip to content

Commit 7e64b79

Browse files
committed
coverage badge
1 parent 2712551 commit 7e64b79

6 files changed

Lines changed: 370 additions & 14 deletions

File tree

.coveralls.sample.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
repo_token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

.github/workflows/test.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Stackpress Types Test Suite
2-
on: [push]
2+
on: ["push", "pull_request"]
33
jobs:
44
test:
55
runs-on: ubuntu-latest
@@ -14,9 +14,4 @@ jobs:
1414
- name: Building Code
1515
run: yarn build
1616
- name: Run Tests
17-
run: yarn test
18-
- name: Update Coverage
19-
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
20-
uses: we-cli/coverage-badge-action@main
21-
with:
22-
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
17+
run: yarn test

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,6 @@ dist
128128
.yarn/build-state.yml
129129
.yarn/install-state.gz
130130
.pnp.*
131+
132+
# coveralls
133+
.coveralls.yml

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Stackpress Library
22

3-
[![cov](https://stackpress.github.io/lib/badges/coverage.svg)](https://github.com/stackpress/lib/actions)
4-
53
Shared library used across stackpress projects
64

75
## Install

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
],
1818
"scripts": {
1919
"build": "tsc",
20-
"test": "nyc -r text -r json-summary ts-mocha tests/*.test.ts"
20+
"test": "nyc -r text -r json-summary ts-mocha tests/*.test.ts",
21+
"coverage": "nyc report -r text-lcov|coveralls"
2122
},
2223
"dependencies": {
2324
"@inquirer/prompts": "7.1.0"
@@ -26,8 +27,11 @@
2627
"@types/chai": "4.3.20",
2728
"@types/mocha": "10.0.10",
2829
"@types/node": "22.9.3",
30+
"badgen-cli": "0.2.0",
2931
"chai": "4.5.0",
32+
"coveralls": "3.1.1",
3033
"mocha": "10.8.2",
34+
"mocha-lcov-reporter": "1.3.0",
3135
"nyc": "17.1.0",
3236
"ts-mocha": "10.0.0",
3337
"ts-node": "10.9.2",

0 commit comments

Comments
 (0)