Skip to content

Commit

Permalink
Install Kind by actions
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Iwai <[email protected]>
  • Loading branch information
tenzen-y committed Jan 1, 2025
1 parent 196ea69 commit 53e2f29
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ jobs:
uses: actions/setup-go@v3
with:
go-version-file: go.mod
- name: Setup kind
uses: helm/[email protected]
with:
install_only: true
- name: Run tests
env:
RELEASE_VERSION: test
Expand All @@ -54,4 +58,4 @@ jobs:
PLATFORMS: linux/amd64
INTEL_PLATFORMS: linux/amd64
MPICH_PLATFORMS: linux/amd64
run: make test_e2e
run: make test_e2e -o kind
9 changes: 6 additions & 3 deletions test/e2e/e2e_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ var _ = ginkgo.SynchronizedBeforeSuite(func() []byte {
var _ = ginkgo.SynchronizedAfterSuite(func() {
if !useExistingCluster {
ginkgo.By("Deleting local cluster")
err := runCommand(kindPath, "delete", "cluster")
err := runCommand("/opt/hostedtoolcache/kind/v0.26.0/amd64/kind/bin/kind", "delete", "cluster")
//err := runCommand(kindPath, "delete", "cluster")
gomega.Expect(err).ToNot(gomega.HaveOccurred())
} else if !useExistingOperator {
ginkgo.By("Uninstalling operator")
Expand All @@ -160,11 +161,13 @@ func getEnvDefault(key, defaultVal string) string {
}

func bootstrapKindCluster() error {
err := runCommand(kindPath, "create", "cluster", "--image", kindImage)
err := runCommand("$/opt/hostedtoolcache/kind/v0.26.0/amd64/kind/bin/kind", "cluster", "--image", kindImage)
//err := runCommand(kindPath, "create", "cluster", "--image", kindImage)
if err != nil {
return fmt.Errorf("creating kind cluster: %w", err)
}
err = runCommand(kindPath, "load", "docker-image", mpiOperatorImage, openMPIImage, intelMPIImage, mpichImage)
err = runCommand("/opt/hostedtoolcache/kind/v0.26.0/amd64/kind/bin/kind", "load", "docker-image", mpiOperatorImage, openMPIImage, intelMPIImage, mpichImage)
//err = runCommand(kindPath, "load", "docker-image", mpiOperatorImage, openMPIImage, intelMPIImage, mpichImage)
if err != nil {
return fmt.Errorf("loading container images: %w", err)
}
Expand Down

0 comments on commit 53e2f29

Please sign in to comment.