Add GitHub Action with sticky PR report comments - #7
Merged
Conversation
Coverage-style HTML folders did not render in the pipeline tab because only the HTML files were uploaded. Local CSS/JS/images are now inlined, a zip of the original directory is attached for Download all, and failOnFailedReports can fail the task after publish. Co-authored-by: Jeff Jones <joneja09@users.noreply.github.com>
GitHub has no build-result tab, so the action writes a job summary, uploads artifacts, and posts a sticky PR comment with pass/fail for each HTML file. Azure Pipelines support is unchanged. Co-authored-by: Jeff Jones <joneja09@users.noreply.github.com>
Fixture Reports1 failed, 3 passed (4 reports)
Open HTML report · Workflow artifacts |
joneja09
marked this pull request as ready for review
August 26, 2026 14:29
GitHub comments cannot embed HTML, and workflow artifacts are zip downloads.
Publish inlined reports to gh-pages at pr/{number}/{artifact}/ and turn each
table row into a clickable HTML link after a successful preview deploy.
Co-authored-by: Jeff Jones <joneja09@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recommendation
Rename the GitHub repo to
ci-html-viewer: yes, when you are ready. It matches a multi-platform tool. I cannot rename it from here (ghis read-only). Do it in GitHub Settings; clone URLs will change. Keep the Azure DevOps extension id (html-report-portal) so existing installs keep working.action.ymlis already at the repo root, so after a rename the action becomesjoneja09/ci-html-viewer@v1.GitHub Actions version: yes. Azure has a build-result tab; GitHub does not. The action publishes the same HTML reports to the job summary and as artifacts.
Apply results on the PR: we were not doing that before. This change does:
<!-- ci-html-viewer:Name -->) with pass/fail per HTML file, updated on re-runs instead of stacking commentsreport-diris a directory)Should the PR comment link to the HTML file?
Yes. GitHub comments are markdown only, so the report itself cannot be embedded, and an artifact URL is a zip download rather than a page you can open.
This update publishes the inlined HTML to GitHub Pages (
gh-pages, pathpr/{number}/{artifact-name}/) and turns each report name into a link:[newman-pass.html](https://<owner>.github.io/<repo>/pr/7/Fixture-Reports/newman-pass.html)index.htmlThe Pages push is best-effort (
continue-on-error). If it fails, the comment still posts pass/fail plus a workflow artifacts link, without broken HTML URLs.Enable Settings → Pages → Deploy from a branch →
gh-pagesonce so those links render. Until that is set, HTML links may 404.The job that uses the action needs:
Usage
Set
pages-preview: falseto skip the Pages deploy and keep filename-only comments.Note on #6
This branch is based on #6 (asset inlining / zip / fail-on-failed-reports). Merging this PR includes that work. If #6 is merged first, this PR shrinks to the GitHub Action files.
Testing
index.htmllistings, andprepareReportsgithub-action/render-comment.jsproducing clickable HTML links