Publish test results on GitHub pages#13
Open
PramodKumarYadav wants to merge 7 commits intomicrosoft:mainfrom
Open
Publish test results on GitHub pages#13PramodKumarYadav wants to merge 7 commits intomicrosoft:mainfrom
PramodKumarYadav wants to merge 7 commits intomicrosoft:mainfrom
Conversation
…ease update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-node@v3, actions/upload-artifact@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
…easy access. - Also updated Readme file with necessary instructions.
Contributor
Author
|
For reference implementation, here is the project where I tested and implemented this change: https://github.com/PramodKumarYadav/playwright-sandbox?tab=readme-ov-file. |
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.
Problem statement:
In the current GitHub workflow, the test report is made available as a zip archive; which requires users to first download it, unarchive it, copy it to a repo that has playwright installed and then view it; say from their local machine.
Idea is to make the report immediately available to users by publishing it on Projects GitHub Pages: https://microsoft.github.io/playwright-examples/
Solution:
By using official GitHub actions as specified here, I updated the workflow to publish html test result artefact both as a zip file and also on GitHub pages.
Tests
Since I am not a project admin or maintainer of microsoft/playwright-examples/ repo, I tried this solution on a personal Sandbox project and found it to be working correct for both below tested scenarios:
When all tests are green.

When there are test failures.
I think this would really improve the user experience of testers who use GitHub actions as a solution.
Sidenote
While updating readme file, I also took some liberty to add some emojis for the headings and name the section as "Getting started". "Getting started" is usually a standard I have seen followed in most projects to explain what users should do to "Get started" and hence the update.
Additional Info
The actions I used are all approved, from GitHub itself and are available on GitHub marketplace: https://github.com/marketplace?query=github+pages&type=actions