Added ‘lcovhtml’ to reporters and
open html-report/index.html
Slide 41
Slide 41 text
CI x Coverage service
Slide 42
Slide 42 text
Pull
request
build &
invoke test runner
Run tests on
multiple browsers
Track code coverage
Slide 43
Slide 43 text
Send a pull request & wait result :-)
git push upstream more-login-test
hub pull-request
Slide 44
Slide 44 text
No content
Slide 45
Slide 45 text
.travis.yml
Notice: SauceLabsTunnel doesn’t support node.js 0.12
Slide 46
Slide 46 text
package.json
gulpfile.js
Slide 47
Slide 47 text
https://travis-ci.org/profile/
Slide 48
Slide 48 text
No content
Slide 49
Slide 49 text
Running tests on Browser
Selenium
Slide 50
Slide 50 text
No content
Slide 51
Slide 51 text
Connect to SauceLabs on local machine
environment variables
tests/intern.js
Slide 52
Slide 52 text
But on Travis-CI for open source project!
Don’t put your API token to .travis.yml
use
travis encrypt SAUCE_USERNAME= --add
travis encrypt SAUCE_ACCESS_KEY= --add
Slide 53
Slide 53 text
secure vars will be added to .travis.yml
Slide 54
Slide 54 text
Limitation
Encrypted environment variables are not available to
pull requests from forks due to the security risk of
exposing such information to unknown code.
http://docs.travis-ci.com/user/environment-variables/
Slide 55
Slide 55 text
No content
Slide 56
Slide 56 text
Last Mile!
Slide 57
Slide 57 text
Coveralls setup
npm install coveralls
Added ‘lcov’ reporter to tests/intern.js
add variables into .travis.yml
COVERALLS_REPO_TOKEN (don’t forget encrypting)
COVERALLS_SERVICE_NAME=travis-ci
execute coveralls command in after_script section
cat lcov.info | ./node_modules/coveralls/bin/
coveralls.js
Slide 58
Slide 58 text
No content
Slide 59
Slide 59 text
Transpiled code
Istanbul: #212
babel-istanbul
ibrik - CoffeeScript meets Istanbul
transform-coverage.js - generate lcov report with
source code by source map
https://github.com/hammerlab/pileup.js/blob/master/scripts/transform-
coverage.js