How do show my tests passing/failing in Github?

mikemaccana picture mikemaccana · Nov 24, 2012 · Viewed 28.5k times · Source

I have a project on github that has extensive unit tests (using mocha for node.js).

I'd like to show off by showing those tests passing/failing on each page. I notice other projects on Github are doing this.

enter image description here

I've been unable to find any documentation on how to make the test status display.

  • How can I make Github show unit test output?
  • Does Github run the tests or do you need to hook up with an external webapp?
  • Is there a free webservice to do this (my app is Open Source)?

Answer

relekang picture relekang · Nov 24, 2012

Take a look at Travis CI. You can use it with GitHub.

They have docs on using NodeJS

Those badges you see are called "status images" and Travis provides MarkDown that you can insert into your project's README.md file.