happy-hours / crushlines

Check out who is checking you out
4 stars 1 forks source link

set up travis and code coverage #5

Closed heron2014 closed 8 years ago

heron2014 commented 8 years ago

As a developer I want to make sure that my code is fully tested.

heron2014 commented 8 years ago

Reference to Travis

Steps to set up travis: (badge - build passing)

language: node_js
node_js:
- 4.2

Pull Request with Travis on:

without_coverage_raport

Steps to set up Code Coverage

Reference to istanbul

before_install:
  - pip install --user codecov
after_success:
- codecov --file coverage/lcov.info --disable search

(--user flag is important otherwise Travis will throw permission error) (

after_success:
  - codecov

) The above line made our coverage report works as a charm as opposed to :

after_success:
- codecov --file coverage/lcov.info --disable search
"scripts": {
"test": "./node_modules/.bin/istanbul cover ./node_modules/tape/bin/tape ./test/*test.js && istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100",
"coverage": "istanbul cover ./node_modules/.bin/tape ./tests/*.js"

Pull Request with Code Coverage:

with_codecoverage

heron2014 commented 8 years ago

Adding badges:

heron2014 commented 8 years ago

Resolved with this PR