66 - master
77 pull_request :
88
9+ concurrency :
10+ group : ${{ github.workflow }}-${{ github.ref }}
11+ cancel-in-progress : true
12+
913env :
1014 REPOSITORY : koperator_e2e_test
1115
1216jobs :
1317 build :
14- runs-on : ubuntu-latest
18+ runs-on : ubuntu-22.04
1519
1620 steps :
21+ - name : Checkout code
22+ uses : actions/checkout@v4
23+
24+ - name : Clean workspace
25+ run : |
26+ # Remove any existing go.work files to ensure clean module resolution
27+ rm -f go.work go.work.sum
28+
1729 - name : Set up Go
18- uses : actions/setup-go@v4
30+ uses : actions/setup-go@v5
31+ with :
32+ go-version : ' 1.25'
33+
34+ - name : Cache Go modules
35+ uses : actions/cache@v4
1936 with :
20- go-version : 1.21
37+ path : |
38+ ~/.cache/go-build
39+ ~/go/pkg/mod
40+ key : ${{ runner.os }}-go-${{ hashFiles('go.sum', 'api/go.sum', 'properties/go.sum', 'tests/e2e/go.sum') }}
41+ restore-keys : |
42+ ${{ runner.os }}-go-
2143
2244 # Enable Tmate Session if you'd like to Debut the E2E Kind Cluster
2345 # - name: Setup tmate session
2446 # uses: mxschmitt/action-tmate@v3
2547 # with:
2648 # detached: true
27-
28- - name : Checkout code
29- uses : actions/checkout@v4
3049
3150 - name : Build docker image
3251 run : |
@@ -41,10 +60,18 @@ jobs:
4160 kind load docker-image $REPOSITORY:$GITHUB_SHA --name e2e-kind
4261
4362
63+ - name : Download dependencies
64+ run : |
65+ # Download dependencies for all modules
66+ go mod download
67+ cd api && go mod download && cd ..
68+ cd properties && go mod download && cd ..
69+ cd tests/e2e && go mod download && cd ../..
70+
4471 - name : Run E2E tests
4572 env :
4673 KUBECONFIG : ${{ steps.setup-kind.outputs.kubeconfig }}
4774 run : |
48- go work init
49- go work use -r .
75+ # Clean any existing go. work files to avoid workspace conflicts
76+ rm -f go.work go.work.sum
5077 IMG_E2E=$REPOSITORY:$GITHUB_SHA make test-e2e
0 commit comments