Skip to content

Commit

Permalink
Merge pull request #10 from sandersky/master
Browse files Browse the repository at this point in the history
Add code coverage
  • Loading branch information
sandersky committed Mar 10, 2016
2 parents fccc93d + 1baf729 commit 5e8c980
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ branches:
- /^v[0-9\.]+/
cache:
directories:
- bower_components
- node_modules
addons:
apt:
Expand Down Expand Up @@ -45,9 +44,7 @@ script:
- npm run lint
- ember try:one $EMBER_TRY_SCENARIO --- ember test
after_success:
- sed -i -- 's/SF:ember-frost-tabs\/\(.*\)/SF:addon\/\1.js/' coverage/lcov.info &&
rm -f coverage/lcov.info--
- cat coverage/lcov.info | coveralls
- .travis/publish-coverage.sh
before_deploy:
- pr-bumper bump
deploy:
Expand Down
9 changes: 9 additions & 0 deletions .travis/publish-coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

if [ "$EMBER_TRY_SCENARIO" != "default" ]
then
echo "Skipping coverage publish for EMBER_TRY_SCENARIO ${EMBER_TRY_SCENARIO}"
exit 0
fi

cat coverage/lcov.info | coveralls
3 changes: 3 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@
},
"resolutions": {
"ember": "2.4.1"
},
"devDependencies": {
"blanket": "5e94fc30f2e694bb5c3718ddcbf60d467f4b4d26"
}
}
Empty file added coverage/.gitkeep
Empty file.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"broccoli-asset-rev": "^2.4.2",
"ember-cli": "^2.3.0",
"ember-cli-app-version": "^1.0.0",
"ember-cli-blanket": "0.9.1",
"ember-cli-content-security-policy": "^0.5.0",
"ember-cli-dependency-checker": "^1.2.0",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
Expand Down
25 changes: 25 additions & 0 deletions tests/blanket-options.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* globals blanket, module */

var options = {
modulePrefix: 'ember-frost-tabs',
filter: '//.*ember-frost-tabs/.*/',
antifilter: '//.*(tests|template).*/',
loaderExclusions: [],
enableCoverage: true,
cliOptions: {
reporters: ['lcov'],
autostart: true,
lcovOptions: {
outputFile: 'coverage/lcov.info',
renamer: function (fileName) {
return fileName.replace('ember-frost-tabs', 'addon') + '.js'
}
}
}
}

if (typeof exports === 'undefined') {
blanket.options(options)
} else {
module.exports = options
}

0 comments on commit 5e8c980

Please sign in to comment.