Skip to content

Commit 4408672

Browse files
committed
ci: fix kongintegration cache
1 parent 7c66ced commit 4408672

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

.github/workflows/_kongintegration_tests.yaml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
permissions:
77
contents: read
88

9+
env:
10+
MISE_VERBOSE: 1
11+
MISE_DEBUG: 1
12+
913
jobs:
1014
kongintegration-tests:
1115
timeout-minutes: ${{ fromJSON(vars.GHA_EXTENDED_TIMEOUT_MINUTES || 60) }}
@@ -19,13 +23,16 @@ jobs:
1923
- name: oss
2024
enterprise: false
2125
steps:
22-
- name: checkout repository
23-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2427

25-
- name: setup golang
26-
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
28+
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
29+
id: setup-go
2730
with:
2831
go-version-file: go.mod
32+
cache: false
33+
- run: |
34+
echo "GO_MOD_CACHE=$(go env GOMODCACHE)" >> $GITHUB_ENV
35+
echo "GO_BUILD_CACHE=$(go env GOCACHE)" >> $GITHUB_ENV
2936
3037
- uses: Kong/kong-license@c4decf08584f84ff8fe8e7cd3c463e0192f6111b # master @ 20250107
3138
id: license
@@ -49,12 +56,23 @@ jobs:
4956
install: false
5057

5158
- run: echo "GOTESTSUM_JUNITFILE=kongintegration-${{ matrix.name }}-tests.xml" >> $GITHUB_ENV
59+
- run: echo "GO_CACHE_KEY=go-kongintegration-${{ matrix.name }}-${{ runner.os }}-${{ runner.arch }}-go-${{ hashFiles('**/go.mod') }}" >> $GITHUB_ENV
60+
- run: echo "GO_CACHE_KEY_2=go-kongintegration-${{ matrix.name }}-${{ runner.os }}-${{ runner.arch }}-go-" >> $GITHUB_ENV
61+
62+
- name: Save Go cache
63+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306
64+
with:
65+
path: |
66+
${{ env.GO_MOD_CACHE }}
67+
${{ env.GO_BUILD_CACHE }}
68+
key: ${{ env.GO_CACHE_KEY }}
69+
restore-keys: |
70+
${{ env.GO_CACHE_KEY }}
71+
${{ env.GO_CACHE_KEY_2 }}
5272
5373
- name: run kong integration tests
5474
run: make test.kongintegration
5575
env:
56-
MISE_VERBOSE: 1
57-
MISE_DEBUG: 1
5876
GOTESTSUM_JUNITFILE: ${{ env.GOTESTSUM_JUNITFILE }}
5977
KONG_CUSTOM_DOMAIN: konghq.tech
6078
TEST_KONG_KONNECT_ACCESS_TOKEN: ${{ secrets.KONG_TEST_KONNECT_ACCESS_TOKEN }}

0 commit comments

Comments
 (0)