Skip to content

Improvements to diff report generation #12991

@nrmancuso

Description

@nrmancuso

Noticed at #12990, we keep a lot of complex steps/logic in the https://github.com/checkstyle/checkstyle/blob/8a2aa986c75fd7ef136a51f87ff5ff751db49dc4/.github/workflows/diff-report.yml file. We should move steps out to a single script file, where we can invoke the script with a single argument command to handle steps, like we do with validation.sh.

This will help to clean up and make the yaml more readable, and allow us to run the same shellcheck version on the bash in this workflow that we do on other bash scripts, instead of relying on built-in shellcheck of actionlint.

Work on this migration has begin at #12990, we can continue to add steps as options in diff-report.sh.


We also need to restructure the entire workflow to be the following:

  1. parse body of PR description, validate links first (see example Issue #12997: Resolve pitest suppression for FinalLocalVariableCheck #12998 (comment)) and download configs/projects files - this is the most frequent point of failure, so we should do this first to fail job as quickly as possible
  2. checkout checkstyle repo
  3. create temporary folder for all report generation, etc. called ci-temp to match other CI jobs
  4. checkout contribution to that folder
  5. generate reports
  6. upload to s3
  7. Place comment in PR

Main idea here is that we will work from the root of the checkstyle project, and not the workspace, and only clone the repo once.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions