Skip to content

Commit c83135b

Browse files
committed
(ci/test): add CodeCov test coverage reporting
- change CI to output and upload coverage reports - (docs): add coverage badge to README
1 parent 6104acb commit c83135b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@ language: node_js
22
# default is the very old 0.10.48; match local version instead
33
node_js: '8.9'
44

5-
script: npm test
6-
after_script: npm run test:pub
5+
script: npm test -- --coverage
6+
after_script:
7+
# upload coverage reports to CodeCov
8+
- bash <(curl -s https://codecov.io/bash)
9+
- npm run test:pub

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<br><!-- status / activity -->
1313
[![typings](https://img.shields.io/npm/types/mst-persist.svg)](https://github.com/agilgur5/mst-persist/blob/master/src/index.ts)
1414
[![build status](https://img.shields.io/travis/agilgur5/mst-persist/master.svg)](https://travis-ci.org/agilgur5/mst-persist)
15+
[![code coverage](https://img.shields.io/codecov/c/gh/agilgur5/mst-persist/master.svg)](https://codecov.io/gh/agilgur5/mst-persist)
1516
<br>
1617
[![NPM](https://nodei.co/npm/mst-persist.png?downloads=true&downloadRank=true&stars=true)](https://npmjs.org/package/mst-persist)
1718

0 commit comments

Comments
 (0)