Skip to content

Add Code Coverage Reporting #431

@ekryski

Description

@ekryski

For each repo we need to:

  • update the travis.yml file

    sudo: false
    language: node_js
    node_js:
      - 'node'
      - '6'
      - '4'
      - 'iojs' #end of life Jan. 2017
      - '0.12' #end of life Jan. 2017
      - '0.10' #end of life Jan. 2017
    addons:
      code_climate:
        repo_token: 'd91570a5de532850a5c512e5f5f33a459060b8f38d7ab15487e1eb219e2577ee'
    before_script:
      - npm install -g codeclimate-test-reporter
    after_script:
      - codeclimate-test-reporter < coverage/lcov.info
    
  • add a .istanbul.yml file

    verbose: false
    instrumentation:
      root: src/
      excludes:
        - lib/
      include-all-sources: true
    reporting:
      print: summary
      reports:
        - html
        - text
        - lcov
      watermarks:
        statements: [50, 80]
        lines: [50, 80]
        functions: [50, 80]
        branches: [50, 80]
    
  • update the .gitignore and .npmignore files

  • add a mocha.opts file

    --recursive test/
    --compilers js:babel-core/register
    
  • add build badges to readme

  • update package.json file

    • add a coverage task (see complete repos)

"coverage": "istanbul cover node_modules/mocha/bin/_mocha -- --opts mocha.opts",

- update mocha task to use `mocha.opts`
- update `test` task to use `npm run coverage` instead of `npm run mocha`
- install istanbul
  • ensure the repo is added to CodeClimate

You can find the repo_token by going into "settings" and then "test coverage".

screen shot 2016-10-21 at 11 21 03 pm

screen shot 2016-10-21 at 11 21 15 pm

Repos

  • generator-feathers-plugin
  • feathers-service-tests?
  • feathers-hooks-common
  • feathers-authentication-local
  • feathers-authentication
  • feathers-authentication-oauth2
  • feathers-authentication-client
  • feathers-knex
  • feathers-localstorage
  • feathers-errors
  • feathers-sendgrid
  • feathers-mailgun
  • feathers-mailer
  • feathers-stripe
  • feathers-twilio
  • feathers-blob
  • feathers-levelup
  • feathers-cli
  • feathers-generator
  • feathers-sequelize
  • feathers-reactive
  • feathers-waterline
  • feathers-configuration
  • feathers-batch
  • feathers-sync
  • feathers-bootstrap

Require updates to coverage task to use relative path to _mocha

"coverage": "istanbul cover node_modules/mocha/bin/_mocha -- --opts mocha.opts",

  • feathers
  • feathers-permissions
  • feathers-mongodb
  • feathers-mongoose
  • feathers-nedb
  • feathers-query-filters
  • feathers-hooks
  • feathers-commons
  • feathers-rethinkdb
  • feathers-socket-commons
  • feathers-primus
  • feathers-socketio
  • feathers-rest -> PR #78
  • feathers-memory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions