Skip to content

Commit 65782ea

Browse files
author
Valentin Hervieu
committed
chore(CI): Add reporting to codecov
1 parent a2fb20f commit 65782ea

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ before_script:
1212
- npm run build
1313
script:
1414
- npm run test
15+
after_success:
16+
- npm run report-coverage

karma.conf.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ module.exports = function (config) {
4545
autoWatch: false,
4646

4747
coverageReporter: {
48-
type: 'html',
49-
dir: 'tests/coverage'
48+
// specify a common output directory
49+
dir: 'tests/coverage',
50+
type: 'lcov',
51+
subdir: '.'
5052
},
5153

5254

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"scripts": {
1515
"commit": "git-cz",
1616
"build": "grunt",
17-
"test": "grunt test"
17+
"test": "grunt test",
18+
"report-coverage": "cat ./tests/coverage/lcov.info | codecov"
1819
},
1920
"peerDependencies": {
2021
"angular": "^1.2.x"
@@ -25,6 +26,7 @@
2526
"chai": "^3.4.1",
2627
"chai-as-promised": "^5.1.0",
2728
"chai-things": "^0.2.0",
29+
"codecov.io": "^0.1.6",
2830
"commitizen": "^2.4.6",
2931
"cz-conventional-changelog": "^1.1.5",
3032
"grunt": "~0.4.2",

0 commit comments

Comments
 (0)