Skip to content

Commit

Permalink
Submit reports to coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound committed Sep 5, 2016
1 parent f044763 commit 69ebc7f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ script:
- npm run test-electron-coverage
- npm run test-spectron

after_success:
- bash <(curl -s https://codecov.io/bash)

notifications:
webhooks:
urls:
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"prestart": "pre-flight && node vendor/mac_patch_dev.js",
"start": "electron . --dev",
"watch": "gulp watch",
"_remap": "remap-istanbul -i coverage/coverage-final.json -o coverage -t html && remap-istanbul -i coverage/coverage-final.json -o coverage/lcov.info -t lcovonly"
"_remap": "remap-istanbul -i coverage/coverage-final.json -o coverage -t html && remap-istanbul -i coverage/coverage-final.json -o coverage/lcov.info -t lcovonly && npm run _coveralls",
"_coveralls": "node test/istanbul-patch-lcov.js | node node_modules/coveralls/bin/coveralls.js"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -93,6 +94,7 @@
"chai": "^3.5.0",
"chai-as-promised": "^5.3.0",
"chai-fs": "chaijs/chai-fs",
"coveralls": "^2.11.12",
"cross-env": "^2.0.1",
"devtron": "^1.0.1",
"electron-devtools-installer": "^2.0.1",
Expand Down
7 changes: 7 additions & 0 deletions test/istanbul-patch-lcov.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const fs = require('fs');
const path = require('path');


const lcov = fs.readFileSync(path.resolve(__dirname, '..', 'coverage', 'lcov.info'), 'utf8');
const sep = process.platform === 'win32' ? '\\' : '/';
console.log(lcov.replace(/SF:/g, `SF:src${sep}`));

0 comments on commit 69ebc7f

Please sign in to comment.