Skip to content

Commit 53e2f29

Browse files
committed
Install Kind by actions
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
1 parent 196ea69 commit 53e2f29

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ jobs:
4646
uses: actions/setup-go@v3
4747
with:
4848
go-version-file: go.mod
49+
- name: Setup kind
50+
uses: helm/kind-action@v1.12.0
51+
with:
52+
install_only: true
4953
- name: Run tests
5054
env:
5155
RELEASE_VERSION: test
@@ -54,4 +58,4 @@ jobs:
5458
PLATFORMS: linux/amd64
5559
INTEL_PLATFORMS: linux/amd64
5660
MPICH_PLATFORMS: linux/amd64
57-
run: make test_e2e
61+
run: make test_e2e -o kind

test/e2e/e2e_suite_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ var _ = ginkgo.SynchronizedBeforeSuite(func() []byte {
142142
var _ = ginkgo.SynchronizedAfterSuite(func() {
143143
if !useExistingCluster {
144144
ginkgo.By("Deleting local cluster")
145-
err := runCommand(kindPath, "delete", "cluster")
145+
err := runCommand("/opt/hostedtoolcache/kind/v0.26.0/amd64/kind/bin/kind", "delete", "cluster")
146+
//err := runCommand(kindPath, "delete", "cluster")
146147
gomega.Expect(err).ToNot(gomega.HaveOccurred())
147148
} else if !useExistingOperator {
148149
ginkgo.By("Uninstalling operator")
@@ -160,11 +161,13 @@ func getEnvDefault(key, defaultVal string) string {
160161
}
161162

162163
func bootstrapKindCluster() error {
163-
err := runCommand(kindPath, "create", "cluster", "--image", kindImage)
164+
err := runCommand("$/opt/hostedtoolcache/kind/v0.26.0/amd64/kind/bin/kind", "cluster", "--image", kindImage)
165+
//err := runCommand(kindPath, "create", "cluster", "--image", kindImage)
164166
if err != nil {
165167
return fmt.Errorf("creating kind cluster: %w", err)
166168
}
167-
err = runCommand(kindPath, "load", "docker-image", mpiOperatorImage, openMPIImage, intelMPIImage, mpichImage)
169+
err = runCommand("/opt/hostedtoolcache/kind/v0.26.0/amd64/kind/bin/kind", "load", "docker-image", mpiOperatorImage, openMPIImage, intelMPIImage, mpichImage)
170+
//err = runCommand(kindPath, "load", "docker-image", mpiOperatorImage, openMPIImage, intelMPIImage, mpichImage)
168171
if err != nil {
169172
return fmt.Errorf("loading container images: %w", err)
170173
}

0 commit comments

Comments
 (0)