Skip to content

Add initial CI workflow#13

Merged
itaysk merged 1 commit into
itaysk:masterfrom
mig4:5-auto-build-test
Nov 8, 2019
Merged

Add initial CI workflow#13
itaysk merged 1 commit into
itaysk:masterfrom
mig4:5-auto-build-test

Conversation

@mig4

@mig4 mig4 commented Oct 28, 2019

Copy link
Copy Markdown
Contributor

Runs build and test in the provided environment.

Closes #5

@mig4 mig4 changed the title [WIPAdd initial CI workflow [WIP] Add initial CI workflow Oct 28, 2019
@mig4 mig4 force-pushed the 5-auto-build-test branch 2 times, most recently from b810ba1 to 69d0044 Compare October 29, 2019 08:05

@itaysk itaysk left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Hi @mig4 , thanks for working on this!
At the current state this PR doesn't bring value since the always CI fails. I see that unit and component pass, but kubectl and krew don't (makes sense cause their dependencies are missing). I could merge this as is if you run only the specific tests that can pass (change make test to make test-unit test-component).
Also, just out of curiosity, can you explain how jq ends up in the environment given you are not explicitly installing it?

@mig4

mig4 commented Oct 31, 2019

Copy link
Copy Markdown
Contributor Author

Hi @itaysk, yeah, not ready to merge yet. I opened the PR early to see the workflow in action, but marked as WIP when I realised more is needed.

I got it to that point and needed to think about how to deal with the fact Kube is required for the two suites to work. I actually just got an idea, well, something I've seen elsewhere, it's to check if k8s is available and if not, spin up a local k3s or kind.

I was also researching if we can make use of additional service containers to spin up a cluster. But if not, it'd probably be best to do something like that in bats setup/teardown, or if not possible then in Makefile before launching bats. What do you think about that?

As for jq, it comes as part of standard virtual environment provided on the GitHub runners.

@itaysk

itaysk commented Nov 1, 2019

Copy link
Copy Markdown
Owner

Right, sorry I missed the [WIP] in the title!
Integrating kind as additional service is fantastic. Let me know if you prefer to merge this one with just unit/component tests and work on the e2e test on a separate PR, or to continue working on this PR.

@mig4

mig4 commented Nov 1, 2019

Copy link
Copy Markdown
Contributor Author

That's a good point, since it increases the scope it makes sense to separate the tests requiring kind into a separate PR. I'll update this later today to split it.

@mig4 mig4 force-pushed the 5-auto-build-test branch from 69d0044 to c7bb51a Compare November 3, 2019 22:52
Runs build, unit and component tests in the provided environment.
@mig4 mig4 force-pushed the 5-auto-build-test branch from c7bb51a to 9ad6473 Compare November 4, 2019 19:37
@mig4 mig4 changed the title [WIP] Add initial CI workflow Add initial CI workflow Nov 4, 2019
@mig4 mig4 requested a review from itaysk November 4, 2019 20:02
@mig4

mig4 commented Nov 4, 2019

Copy link
Copy Markdown
Contributor Author

Hi @itaysk, I updated this change to limit the scope to only running the basic tests and opened #15 for extending it to run all tests including those that require k8s. I also found someone already created an action for setting up kind/minikube in test env so this should be easier to add than I previously assumed 🎉 😄

Anyway, this one passes now so it should be good for another review. Thanks!

@itaysk

itaysk commented Nov 8, 2019

Copy link
Copy Markdown
Owner

good work, thanks!
just heads up that when we'll start using goreleaser soon, this workflow will change accordingly (use the goreleaser action).

@itaysk itaysk merged commit 9c9639f into itaysk:master Nov 8, 2019
@mig4 mig4 deleted the 5-auto-build-test branch November 8, 2019 14:33
@itaysk

itaysk commented Nov 9, 2019

Copy link
Copy Markdown
Owner

Taking back the following:

just heads up that when we'll start using goreleaser soon, this workflow will change accordingly (use the goreleaser action).

This workflow is for CI, and goreleaser is for CD. I've added go releaser and left this workflow intact.

@itaysk itaysk mentioned this pull request Nov 9, 2019
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.

automate build/test using GitHub Actions

2 participants