Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add check-project workflow #1746

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gamesh411
Copy link
Contributor

Create a workflow for analyzing Java projects via PR versions of
Spotbugs. Baseline diff and time measurement features are added to
monitor the impact of PRs (result set changes or possible regressions).
Open-source projects spotbugs, matsim and jenkins are added as test
subjects.


Make sure these boxes are checked before submitting your PR -- thank you!

  • Added an entry into CHANGELOG.md if you have changed SpotBugs code

Create a workflow for analyzing Java projects via PR versions of
Spotbugs. Baseline diff and time measurement features are added to
monitor the impact of PRs (result set changes or possible regressions).
Open-source projects spotbugs, matsim and jenkins are added as test
subjects.
@gamesh411
Copy link
Contributor Author

Hi,
Sorry for the delay, I had been sidetracked quite a bit in my OpenSource activities.
This my second take on this PR: #1584.
I have addressed the following issues mentioned there:

  • fixed the typos found by @ThrawnCA and @KengoTODA
  • moved the documentation to the main workflow's YAML file as requested by @KengoTODA
  • download all projects that the CI analyzes instead of storing big binary data (which was bad, I admit, thanks @KengoTODA )

With these in place I would like to propose this new PR, which consists of only 2 workflow files.
If you would like to see it in action, please check my testing PR in my Sportbugs fork:
gamesh411#21

If you have any ideas or suggestions as to how to improve this differential CI, please feel free to share!
Cheers,
Endre

- name: Cache analyzed Spotbugs
uses: actions/cache@v2
with:
path: spotbugs-4.4.1.jar
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you move the version infos to variables, so it's easier to modify them in the future? (Not only for spotbugs, but the other projects as well.)

const resultDiff = fs.readFileSync(`${projectDir}/result_diff`)

const body =
`${projectName}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it would be easier to understand if the comments contained whole sentences, instead of only the bare minimal info. Also, it would be a bit more informative, if it contained not only the name of the tested project, but a link to the exact source and some version info (or commit hash).
This line could be e.g. Testing/Running this PR on ${projectName} (${projectUrl}) version ${projectVersion}..

`${projectName}
baseline time: ${baselineTime}s
new time: ${newTime}s
results diff: ${resultDiff ? '\n```' + resultDiff + '```' : '-'}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there are no differences, instead of an empty codeblock, there could a No differences were found. or The results are identical. or some other similar string.


steps:
- name: Checkout PR
uses: actions/checkout@v2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This version is old.

java-version: '17.0.x'

- name: Cache Gradle
uses: actions/cache@v2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This version is old.

persist-credentials: false

- name: Set up JDK 17
uses: actions/setup-java@v1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This version is old.

@github-actions github-actions bot added the Stale label Mar 5, 2024
@github-actions github-actions bot closed this Apr 9, 2024
@hazendaz hazendaz reopened this Apr 12, 2024
@github-actions github-actions bot removed the Stale label Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants