Skip to content

Commit 71b71d1

Browse files
authored
Merge pull request #60 from codingtools/feature/codecov-integration
adding codecov to test coverage
2 parents 4f03d2c + 149973f commit 71b71d1

File tree

7 files changed

+119
-8
lines changed

7 files changed

+119
-8
lines changed

.circleci/config.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ jobs:
2525
command: npm test
2626
- run:
2727
name: Generate code coverage
28-
command: './node_modules/.bin/nyc report --reporter=text-lcov'
29-
- store_artifacts:
30-
path: test-results.xml
31-
prefix: tests
32-
- store_artifacts:
33-
path: coverage
34-
prefix: coverage
28+
command: ./node_modules/.bin/nyc report --reporter=json
29+
- run:
30+
name: moving report to right file
31+
command: mv coverage/coverage-final.json coverage/coverage.json
32+
- run:
33+
name: send code coverage to codecov
34+
command: ./node_modules/.bin/codecov
3535

3636
workflows:
3737
version: 2

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ cdt.iml
1111
**/.DS_Store
1212
output/*
1313
!output/.gitkeep
14+
coverage/*.json

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CLI for Developers
55
[![GithubCI](https://github.com/codingtools/cdt/workflows/GithubCI/badge.svg)](https://github.com/codingtools/cdt/actions?query=workflow%3AGithubCI)
66
[![CircleCI](https://circleci.com/gh/codingtools/cdt/tree/release%2Frelease-v0.1.svg?style=shield)](https://circleci.com/gh/codingtools/cdt/tree/release%2Frelease-v0.1)
77
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/82d29e2a902a4c338228d636f290d9cd)](https://app.codacy.com/gh/codingtools/cdt?utm_source=github.com&utm_medium=referral&utm_content=codingtools/cdt&utm_campaign=Badge_Grade_Dashboard)
8+
[![codecov](https://codecov.io/gh/codingtools/cdt/branch/release%2Frelease-v0.1/graph/badge.svg)](https://codecov.io/gh/codingtools/cdt)
89
[![Version](https://img.shields.io/npm/v/@codingtools/cdt)](https://npmjs.org/package/@codingtools/cdt)
910
![npm](https://img.shields.io/npm/dt/@codingtools/cdt)
1011
![node (scoped)](https://img.shields.io/node/v/@codingtools/cdt)[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/codingtools/cdt)](https://github.com/codingtools/cdt/graphs/commit-activity)

coverage/.gitkeep

Whitespace-only changes.

package-lock.json

Lines changed: 106 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"avsc": "^5.4.18",
2020
"axios": "^0.19.0",
2121
"chalk": "^3.0.0",
22+
"codecov": "^3.6.5",
2223
"crypto-js": "^3.1.9-1",
2324
"detect-character-encoding": "^0.8.0",
2425
"encoding-japanese": "^1.0.30",
@@ -29,6 +30,7 @@
2930
"nyc": "^15.0.0",
3031
"ora": "^4.0.2",
3132
"signale": "^1.4.0",
33+
"test": "^0.6.0",
3234
"tslib": "^1.10.0"
3335
},
3436
"devDependencies": {

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"outDir": "lib",
77
"rootDir": "src",
88
"strict": true,
9-
"target": "es2017"
9+
"target": "es2017",
10+
"sourceMap": true
1011
},
1112
"include": [
1213
"src/**/*"

0 commit comments

Comments
 (0)