codeclimate-hook

1.0.0 • Public • Published

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

  • CC_TEST_REPORTER_ID [required]: You can find it under Repo Settings in your Code Climate project.
  • 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.

Package Sidebar

Install

npm i codeclimate-hook

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

12.9 MB

Total Files

28

Last publish

Collaborators

  • lucasbadico