Demonstration repository for publishing Playwright and code coverage reports to GitHub Pages.
The repository contains two branches, main and gh-pages, that contain code for creating the self generating reports.
See our GitHub Pages site for an example of what the reporting dashboard will look like.
See our wiki for detailed information on how to set up publishing reports in your repository.
The main branch contains the .github/workflows/ directory with workflows needed to push reports to gh-pages.
push-to-gh-pages.ymlis a reusable workflow that will push 2 files to specified locations ingh-pagesplaywright-report.ymlruns the Playwright tests and callspush-to-gh-pages.ymlto push the report filesplaywright-report-cleanup.ymlis triggered by a branch being deleted and removes those branch files fromgh-pagescode-coverage-report.ymlruns the unit tests and callspush-to-gh-pages.ymlto push the report files (OPTIONAL)pr-coverage-annotation.ymlis triggered by a pull request to main and runs the unit tests and annotates the results to the pull request
The main branch also contains the example configurations for Playwright and vitest. The examples in the repository will work for any unit testing framework that uses Istanbul for code coverage results. If you are not using Istanbul, the code coverage examples will need to be adapted to work with your reporter.
playwright.config.tscontains the reporters needed for this demonstrationvitest.config.tscontains the coverage settings needed for this demonstration
The gh-pages branch contains the Jekyll configuration needed to build the demonstration site. It also contains one workflow in .github/workflows/.
publish-github-pages.ymlis triggered by pushing togh-pagesand rebuilds and redeploys the site
The gh-pages branch is a working example so it contains report files that will not be needed in your site. You do not need to bring over any of these files, or you can bring them over until you have completed the set up and can use your own reports.
_data/coverage/coverage-summary.json_data/playwright-reports/main.json_data/playwright-reports/branches/*coverage/*playwright-reports/main.htmlplaywright-reports/branches/*