Skip to content

Commit

Permalink
Add coverage and codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
srknzl committed Aug 29, 2021
1 parent 8b5635e commit 7f6ccff
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .github/.codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
coverage:
status:
project:
default:
informational: true
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ jobs:
npm run compile
- name: Tests
run: |
npm test
npm run coverage
- name: Publish to Codecov
uses: codecov/codecov-action@v2
with:
files: coverage/lcov.info
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ node_modules
lib/
.eslintcache
docs

# coverage
.nyc_output
coverage
18 changes: 17 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"main": "lib/bigdecimal.js",
"module": "lib/bigdecimal.mjs",
"scripts": {
"test": "mocha -t 100000 test/**/**/*.js",
"test": "mocha --require ts-node/register --require source-map-support/register -t 100000 test/**/**/*.js",
"coverage": "nyc --reporter=lcov npm run test",
"compile": " npm run compile:cjs && npm run compile:esm && npm run prepareESM",
"compile:esm": "tsc --module es2020 --outDir lib/esm",
"compile:cjs": "tsc --module commonjs --outDir lib",
Expand Down Expand Up @@ -65,8 +66,23 @@
"chai": "~4.3",
"eslint": "~7.28.0",
"mocha": "~9.0.0",
"nyc": "^15.1.0",
"rimraf": "~3.0.2",
"source-map-support": "^0.5.19",
"ts-node": "^10.2.1",
"typedoc": "~0.20.36",
"typescript": "~4.2.4"
},
"nyc": {
"extension": [
".ts"
],
"exclude": [
"**/*.d.ts"
],
"reporter": [
"html"
],
"all": true
}
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"stripInternal": true,
"declaration": true,
// "outDir": "lib",
"sourceMap": false,
"sourceMap": true,
/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
"target": "es2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
Expand Down

0 comments on commit 7f6ccff

Please sign in to comment.