Testing publish-Reposense on every push/PR on the main repo.
What feature(s) would you like to see in RepoSense
When any PR or changes that have been made on main repo, we want to trigger a workflow that will test the whole report-generation logic at the publish-Reposense with the new changes. This is to detect early regression.
Work done in #2295 explores the use of lighthouse CLI to detect possible blank pages due to possible routing issues.
To fully solve the issue, we may need to integrate the techniques to trigger workflow in another repository with Github Actions (ref)
Is the feature request related to a problem?
#2285 #2295
If possible, describe the solution
Some ideas on possible implementation:
- The event will trigger a POST request to the relevant API that will trigger the workflow in
publish-Reposense, the request's payload should contain information such as PR number or commit hash. publish-Reposenseneed to check out to the correct version of main repo jar file using the payload through running the downloading utility scripts.- Set up
jekyllbuilding environment to run github pages onpublish-Reposense's github action runner - Deploy the website on github action runner
- Use Lighthouse CLI to audit the website, it will exit with error when the page is blank.
Additional context
Useful resources:
- https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#repository_dispatch
- https://github.com/orgs/community/discussions/42316
- https://medium.com/hostspaceng/triggering-workflows-in-another-repository-with-github-actions-4f581f8e0ceb
hi, ive tried this workflow in my local and it seems to work. ive added a trigger-regression-test.yml workflow in RepoSense that automatically triggers a workflow in publish-RepoSense on every pull request. this trigger sends over the PR number and commit SHA to the downstream repo via repository_dispatch.
in publish-reposense, it clones the RepoSense repository at the specified SHA, builds the project with Gradle, runs the website on a GitHub Actions runner and uses Lighthouse CLI to audit the generated site.
please review the PR if it is feasible: publish-RepoSense RepoSense