Skip to content

Commit

Permalink
travis-ci: after_success run coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
RoCky Wu committed Oct 4, 2015
1 parent a95b2e8 commit 2a079b1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
language: node_js
repo_token: ZdPzOJnP7AQgvpXanYDMEQQ4EUKnxoBfh

node_js:
- "4.1.1"
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sh -e /etc/init.d/xvfb start
after_success:
- npm run coveralls
15 changes: 9 additions & 6 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,15 @@ module.exports = function(config) {
},

coverageReporter: {
type: 'lcov', // lcov or lcovonly are required for generating lcov.info files
dir: 'coverage/'
},

coverallsReporter: {
repoToken: 'ZdPzOJnP7AQgvpXanYDMEQQ4EUKnxoBfh'
dir: 'coverage/',
reporters: [
{
type: 'html', subdir: 'html'
},
{
type: 'lcovonly', subdir: '.', file: 'lcov.coveralls'
}
]
},

// web server port
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
{
"name": "react-hi-text",
"version": "0.1.10",
"version": "0.1.11",
"description": "React text highlight component",
"main": "index.js",
"scripts": {
"test": "karma start --single-run --browsers Firefox",
"test.dev": "karma start"
"test.dev": "karma start",
"coveralls": "cat coverage/lcov.coveralls | coveralls && echo publish to coveralls done;"
},
"author": "Rocky Wu <rocky823@gmail.com>",
"license": "MIT",
"devDependencies": {
"babel-core": "^5.8.25",
"babel-loader": "^5.3.2",
"chai": "^3.3.0",
"coveralls": "^2.11.4",
"gulp": "^3.9.0",
"gulp-rename": "^1.2.2",
"gulp-uglify": "^1.4.1",
Expand Down

0 comments on commit 2a079b1

Please sign in to comment.