codeclimate-hook
v1.0.0
Published
Publish code coverage to Code Climate
Downloads
275
Maintainers
Readme
codeclimate-hook
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 coverageENV 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 apre-commithook and you don't want your time to kill you when any tests breaks or they are with no internet to send the report.
