Skip to content

Commit 8790cab

Browse files
committed
Remove helm from github's runner to force tests to download it.
1 parent a4116bd commit 8790cab

3 files changed

Lines changed: 26 additions & 12 deletions

File tree

.github/workflows/unit-tests.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ jobs:
3535
uses: actions/checkout@v1
3636

3737
- name: Test
38-
run: ./hack/coverage.bash
38+
shell: bash
39+
run: |
40+
source ./hack/remove-system-helm.sh
41+
./hack/coverage.bash
3942
4043
test-unit-windows:
4144
runs-on: windows-latest
@@ -46,10 +49,12 @@ jobs:
4649
uses: actions/setup-go@v5
4750
with:
4851
go-version: "1.25"
49-
52+
5053
- name: Check out code into the Go module directory
5154
uses: actions/checkout@v1
5255

5356
- name: Test
54-
run: ./hack/coverage.bash
5557
shell: bash
58+
run: |
59+
source ./hack/remove-system-helm.sh
60+
./hack/coverage.bash

assets/assets.go

Lines changed: 11 additions & 9 deletions
Large diffs are not rendered by default.

hack/remove-system-helm.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
# Remove any helm binary pre-installed by the runner so tests use devspace's bundled helm.
3+
while IFS= read -r h; do
4+
rm -f "$h" 2>/dev/null
5+
[ -e "$h" ] && PATH=$(tr ':' '\n' <<<"$PATH" | grep -vxF "$(dirname "$h")" | tr '\n' ':')
6+
done < <(type -aP helm 2>/dev/null | awk '!seen[$0]++')
7+
export PATH; hash -r 2>/dev/null || true

0 commit comments

Comments
 (0)