-
Notifications
You must be signed in to change notification settings - Fork 29
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
Test bundle builds job before push #378
Conversation
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 think you want to do a test build after the update happens but before it is commit and then released. This prevents a second bad build but not the first.
I am not sure that I understand. Do you mean handle this logic in python code after this line: https://github.com/adafruit/adabot/blob/main/adabot/circuitpython_bundle.py#L563 but before the following ones that commit and push it, rather than having the logic in an actions job only? My understanding of the current implementation is that it won't allow a first bad build to be pushed because the task fetches all submodules recursively here: https://github.com/FoamyGuy/adabot/blob/test_build_before_push/.github/workflows/bundle_cron.yml#L41 before doing the test build. And then if the test build fails the entire I am still happy to change it up if there is a better way, or if I've misunderstood how the actions will behave. Maybe it's just nicer to keep it all in the python code rather than split between python and workflows. |
Yes, I think that's what you need to do. The submodule recursive clone will set the submodules to the existing checked in state, not the updated state. |
…anges from main. add test build bundle logic. remove unneeded if statement. allow RuntimeError to be raised.
# Conflicts: # adabot/circuitpython_bundle.py
The latest commits move the test build logic into the python code after the update and before the commit / push. A few things about how it works now:
|
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.
Thanks! This looks more correct to me. One doc change. Good otherwise.
Python documentation (pydoc) for |
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.
This is better! Thank you!
Resolves: #377
This adds a new job to the bundle cron action which builds both the community and adafruit bundles.
The
update-bundles
job has hadneeds: test-bundle-builds
added to it so that it depends upon the prior test builds job. If that test build fails then update-bundles will be skipped.I tested this to the best of my abilities in a test repo. There are a few failed runs visible here: https://github.com/FoamyGuy/adabot_actions_tests/actions which validated the way that
needs
will skip the job if it's dependency failed. For testing I modified the task to add an erroneous extra file into one of the libraries similarly to what caused the recent build failures.That being said, I'm not sure if there is a great way to test it within the cron task context without just merging it and checking in after the next time it runs. And if there is a desire to test the failure case we'd need to temporarily modify the test build action to make one or both of the builds fail. If anyone does know of a better way to test I'm happy to give it a try.