How do show my tests passing/failing in Github?

continuous-integration, github, unit-testing

Solution

GitHub also has workflow status badges for GitHub Actions.

The image is usually embedded into the `README.md` file using Markdown like this:

![example workflow](https://github.com/<OWNER>/<REPOSITORY>/actions/workflows/<WORKFLOW>.yml/badge.svg)

Problem

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. 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)?

Original source