Skip to content

Commit 4dccdd2

Browse files
committed
test: update
Signed-off-by: Andy Stoneberg <[email protected]>
1 parent 1428a84 commit 4dccdd2

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.github/workflows/ws-e2e-test.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ on:
1717
jobs:
1818
e2e-test:
1919
runs-on: ubuntu-latest
20+
env:
21+
GO_VERSION: '1.22'
2022
defaults:
2123
run:
2224
working-directory: testing
@@ -27,7 +29,20 @@ jobs:
2729
- name: Set up Go
2830
uses: actions/setup-go@v5
2931
with:
30-
go-version: '1.22'
32+
go-version: ${{ env.GO_VERSION }}
33+
34+
- name: Generate cache key from Makefile
35+
id: cache-key
36+
run: |
37+
VERSION_HASH=$(make dependency-hash)
38+
echo "cache_key=testing-bin-${{ runner.os }}-go${{ env.GO_VERSION }}-$VERSION_HASH" >> $GITHUB_OUTPUT
39+
40+
- name: Cache testing/bin directory
41+
uses: actions/cache@v4
42+
id: cache-testing-bin
43+
with:
44+
path: testing/bin
45+
key: ${{ steps.cache-key.outputs.cache_key }}
3146

3247
- name: Setup cluster
3348
run: make setup-cluster

testing/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ istioctl: $(ISTIOCTL) ## Download istioctl locally if necessary.
103103
$(ISTIOCTL): $(LOCALBIN)
104104
$(call go-install-tool,$(ISTIOCTL),istio.io/istio/istioctl/cmd/istioctl,$(ISTIOCTL_VERSION))
105105

106+
.PHONY: dependency-hash
107+
dependency-hash: ## Calculate hash of dependency versions for caching.
108+
@echo -e "KIND_VERSION=$(KIND_VERSION)\nISTIOCTL_VERSION=$(ISTIOCTL_VERSION)" | sha256sum | cut -d' ' -f1 | head -c 16
109+
106110
.PHONY: setup-cluster
107111
setup-cluster: check-kubectl kind istioctl ## Set up a complete kind cluster with cert-manager and Istio.
108112
@export PATH="$(LOCALBIN):$$PATH" && \

0 commit comments

Comments
 (0)