OBOFoundry.github.io
OBOFoundry.github.io copied to clipboard
Add `tox -e lint` to GHA
Resolves #2369
If you check the build, you can see that the step updated the test_roles.py
file
If you do it like this, the files will be formatted wrongly in version control.. you have to: run the Linter and push the updated file to the branch!
@erik-whiting I approve, is this ok to merge?
@matentzn no I don't think so. notice that the checks are still "Waiting for status to be reported." Something about the changes here are causing the checks to hang and I need to figure out why before merging or this will happen on every PR
QC cannot run in response to a commit generated by GHA I think.. So if a change to a branch was induced by a GHA, then no other actions are run to avoid infinite snowballing
oh I see, let's merge then 🤞
The problem is though that we will never know then if the PR is broken for other reasons... I think the solution is to combine both actions (qc and lint), first run the lint, then the qc pipeline (make sure though you "check out" again). But I am not sure how these cases are solved, you may need to reach out to your colleagues or chatgpt:
"I have a GHA that updates my branch with a linter, and a GHA that runs a validation for my code - what is the best practice to make sure that the branch is first updated, then validated?"
The problem is though that we will never know then if the PR is broken for other reasons... I think the solution is to combine both actions (qc and lint), first run the lint, then the qc pipeline (make sure though you "check out" again). But I am not sure how these cases are solved, you may need to reach out to your colleagues or chatgpt:
"I have a GHA that updates my branch with a linter, and a GHA that runs a validation for my code - what is the best practice to make sure that the branch is first updated, then validated?"
@matentzn See the screenshot below
This is from a PR where I forced a CI failure: https://github.com/OBOFoundry/OBOFoundry.github.io/pull/2421
Is this what you mean by the PR being "broken for other reasons?" Notice that GitHub indicates which action it was that failed. So in the screenshot you can see that the PR passed the lint check but failed the validation step because the OBOFoundry Test / test (pull_request)
action has failed. If I combine linting and validation into a single action, a failure will be even more ambiguous (did it fail because the linter failed or the validation?). Is that what you were referring to? If not, I'm not really understanding the concern.
As long as the QC is run AFTER the lint is applied, we are good! Is that the case?
@erik-whiting did you see Nico's question?
I saw his question and took some initial stabs at making it the way Nico wants but I have been really busy with work and school
Ok, no worries! You do a ton of volunteer work for OBO Foundry and we are grateful for whatever you have time for. 🙏
@erik-whiting until you find some time to respond (good luck with your stuff) I will move this PR to "draft"