Publishing Coverage Report/HTML Report on GitHub Pages
In this article, we will be publishing a HTML coverage report using GitHub Pages.
For the GitHub users, especially those who are migrating from Jenkins, there aren’t may options in the documentation for reporting whereas Jenkins has some readily available plugins for it. GitHub provides an feature called GitHub Pages, which can be leveraged here for publishing the HTML report.
GitHub Pages:
GitHub Pages is designed to host your personal, organization or project pages directly from your GitHub repository. Refer this page for detailed information about the GitHub pages. In this story we will utilize this feature to publish the code coverage artifacts as a static webpage.
The only pre-requisite for this usecase is to have a code coverage ran for the application using GitHub actions workflow. For this demonstration purpose, I have added a small python code snippet to run the coverage using the workflow .github/workflows/coverage.yaml in the repo. Follow the below steps to publish the coverage report.
Step 1: Configure GitHub Actions Publishing Source
Navigate to your GitHub repository, click on Settings tab and select the Pages option from the left side column. In the GitHub Actions page, under “Build and Deployment”, select…