RepoSense icon indicating copy to clipboard operation
RepoSense copied to clipboard

Testing publish-Reposense on every push/PR on the main repo.

Open CYX22222003 opened this issue 8 months ago • 1 comments

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:

  1. 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.
  2. publish-Reposense need to check out to the correct version of main repo jar file using the payload through running the downloading utility scripts.
  3. Set up jekyll building environment to run github pages on publish-Reposense's github action runner
  4. Deploy the website on github action runner
  5. 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

CYX22222003 avatar Apr 04 '25 18:04 CYX22222003

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

feliciahmq avatar Jul 27 '25 14:07 feliciahmq