codeclimate-hook

Publish code coverage to Code Climate

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
codeclimate-hook
001.0.04 years ago4 years agoMinified + gzip package size for codeclimate-hook in KB

Readme

codeclimate-hook
MIT License
A hook, with send-coverage command, that send the corevage report to Code Climate.

Usage

Setup the coverage command:

"coverage": "CC_TEST_REPORTER_ID=YOUR_REPORTID yarn send-coverage",

Use in the hook helper(in this case husky):

"husky": {
    "hooks": {
      "pre-push": "yarn coverage"
    }
  },

Or call it manually:

yarn coverage

ENV VARIABLES

  • DEBUG default: false: useful for initial configuration.
  • COVERAGE_COMMAND default: yarn test : The command that runs the tests and generate the coverage report.
  • SILENT_MODE default: true: For not breaking any flow if anything goes wrong, so if you setup a pre-commit hook and you don't want your time to kill you when any tests breaks or they are with no internet to send the report.