GitHub: publish a generated HTML report
Asked Answered
C

0

8

I am wondering how it is possible to publish a generated HTML report via GitHub? I think our use case is quite standard and it looks more or less like this:

  1. Startup docker image
  2. Some python setup work ( install packages from requirements.txt )
  3. Run some python test ( slash run --with-coverage --cov . ./tests --cov-report html ) --> This generates a HTML report indicating the test coverage.
  4. Publish that generated HTML report so that it can directly be viewed from within the browser ( without the need of downloading the report)

I am stuck with step 4. Even there is GitHub pages, it can only publish files that are actually checked in and not reports that get generated during a step in the actions.

Furthermore it seems like that via GitHub I can only specify a certain branch from where it will be published. However, I would like to have this functionality on all branches to see if coverage actually improves or not.

As mentioned, I don't think that this is a rare use case, therefore I am surprised that I don't find any resources about how to achieve this.

Continuator answered 8/7, 2021 at 14:44 Comment(2)
Do you mean something like github.com/marketplace/actions/deploy-to-github-pages? But yes, GHP can only show one site per repo, either from a branch or a directory on the default branch.Jalisajalisco
Ok, thank you. But are there also actions to build and show the reports on a commit base and from each branch?Continuator

© 2022 - 2024 — McMap. All rights reserved.