-
Notifications
You must be signed in to change notification settings - Fork 3
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
Improve CI checks in pull requests #262
Conversation
8a48e6c
to
5607e9f
Compare
* Skip build-test jobs if only documentation changed or in case of duplicate commits * Check contributions by looking for a diff between the head and base of a PR in VERSION and CHANGELOG files
9a2b9d5
to
45d6dae
Compare
Does that work? Imagine the following: You have several commits changing the source and the VERSION, then you open the PR, it fails because you didn't change the CHANGELOG. Then you change the CHANGELOG and it still doesn't run because you only changed an .md file, no? Or do I miss a detail? |
The CI build-test jobs still run even if the "Check if changelog and version have been updated" check fails. So in the first instance where you make your code changes but not the changelog, you would still pass 5/6 checks. Then you update the changelog, pass the 6th test, and the other 5 would still count as passed. In theory, if all the checks have passed and you just change the changelog, it won't trigger a rebuild but still passes. I will try that now by making a single change to the .md file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see now, thats very cool thanks
@buschbapti do you agree with this approach to help make contributions more standardised? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes sorry for the delay. I like it a lot and thanks for the detailed explanation yesterday.
Skip build-test jobs if only documentation changed or in case of duplicate commits
Check contributions by looking for a diff between the head and base of a PR in VERSION and CHANGELOG files
Isn't it annoying when you forget to update the CHANGELOG? And then you have to wait for the CI to rebuild just because of that one line changed in the .md file that has no effect on the pipeline? Or, how about forgetting to update the CHANGELOG or VERSION in the first place? Lots of room for minor inconveniences.
This PR adds a check to ensure the CHANGELOG and VERSION have both been modified. It also uses a special action to check if a CI job is skippable - that is, if only a certain type of file (.md) has been changed.