Delivering mocha results from CI to Github. ๐
$ npm install --save-dev mocha-github-reporter
Setup environment variables.
ENVIRONMENT VARIABLE | EXAMPLE |
---|---|
GITHUB_ACCESS_TOKEN | XXXXX |
GITHUB_REPO_SLUG | scriptnull/mocha-github-reporter |
REPORT_TITLE | Mocha report for Build $BUILD_NUMBER |
REPORT_ALWAYS | true |
REPORT_FORMATTER | all-suites (default). See below for more. |
Run mocha.
$ mocha --reporter mocha-github-reporter tests/
Any one of the following report formats could be setup by specifying it as REPORT_FORMATTER
environment variable.
Resembles default mocha reporting.
emoji can be configured via PASSED_EMOJI
and FAILED_EMOJI
environment variables. Example: FAILED_EMOJI='poop'
Suited to be used as a checklist for sending PR fixes.
- Bug fixes.
- Adding new formatters.
Open issue to discuss more.
"Thanks for taking time to evaluate
mocha-github-reporter
. It means a lot to this project. I hope that, this project takes you one step closer to a supercharged workflow" - scriptnull