Skip to content

Commit a343635

Browse files
authored
Merge pull request testing-library#4 from Gpx/infra
ci: 🎡 report test coverage to codeclimate
2 parents db3b7ef + 828f6e2 commit a343635

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
env:
2+
global:
3+
- CC_TEST_REPORTER_ID=432df2a7d2692b54e9c072feb2c8cec8cd943456c14800c18445b6e65f709a3c
14
language: node_js
25
cache:
36
directories:
@@ -8,6 +11,14 @@ node_js:
811
- '10'
912
- '9'
1013
- '8'
14+
before_script:
15+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
16+
- chmod +x ./cc-test-reporter
17+
- ./cc-test-reporter before-build
18+
after_script:
19+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
20+
script:
21+
- npm run test:coverage
1122
after_success:
1223
- npm run build
1324
- npm run travis-deploy-once "npm run semantic-release"

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"main": "dist/index.js",
66
"scripts": {
77
"test": "jest",
8+
"test:coverage": "npm t -- --coverage",
89
"build": "babel src -d dist",
910
"semantic-release": "semantic-release",
1011
"travis-deploy-once": "travis-deploy-once",

0 commit comments

Comments
 (0)