-
Notifications
You must be signed in to change notification settings - Fork 166
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
Feat/test-github-action #30
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Hans Knecht <[email protected]>
Signed-off-by: Hans Knecht <[email protected]>
feat: update makefile with test_setup command fix: remove unnecessary script docs: update readme.md with new testing information Signed-off-by: Hans Knecht <[email protected]>
Signed-off-by: Hans Knecht <[email protected]>
Signed-off-by: Hans Knecht <[email protected]>
Signed-off-by: Hans Knecht <[email protected]>
dgzlopes
approved these changes
Jun 16, 2021
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! Left one small comment :)
Added the permissions needed to ghcr.io. Once you've sorted out @dgzlopes suggestion, I'm happy to merge it. :) |
Signed-off-by: Hans Knecht <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds two github actions:
Modifies test setup:
Docs:
Details:
When running in github, we obviously don't have etcd or other tooling installed by default. The script that was being used to download all of the env setup wasn't working properly in github (I have some failed actions demonstrating that).
In April of this year, controller-runtime switched to a new method: kubernetes-sigs/controller-runtime@782807d#diff-051375546db9782e3debc25e0241edf1d5e5e2ec0f183dd8634ca5b2c8968bb8
I mimic'd that method with a few modifications to match what was currently happening. I left everything as a makefile script for now, but we may want to move the test-setup command to a bash script at some point to make it easier.
You'll note the addition of an ENV variable, that's based on: kubernetes-sigs/kubebuilder#326
I've currently dropped the kube-builder tools into /tmp/kube-builder but they could theoretically be anywhere. This is really only relevant to people working on the operator.
If there is a different method wanted, then I can explore that route.
I've also configured it so it can run a matrix of tests. This will allow us to test the operator on a variety of linux platforms, with a variety of golang versions, and a variety of k8s versions. I've only included one of each for now for demonstration,
but we can obviously add more.
works towards #20
Successful example here: https://github.com/KnechtionsCoding/operator/runs/2765262646
Next Steps
@simskij will probably need to follow: https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#upgrading-a-workflow-that-accesses-ghcrio to allow the actions/workflow to publish to ghcr