Skip to content

Commit 61dc798

Browse files
authored
Merge pull request #1541 from mythi/PR-2023-047
envtest for older k8s versions
2 parents 0b41af3 + efeb1c5 commit 61dc798

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

.github/workflows/lib-validate.yaml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: validate
22
on:
33
workflow_call:
44

5-
env:
6-
K8S_VERSION: 1.27.1
75
jobs:
86
docs:
97
name: Check docs are buildable
@@ -60,12 +58,26 @@ jobs:
6058
- run: make go-mod-tidy
6159
- run: make BUILDTAGS=kerneldrv
6260
- run: make test BUILDTAGS=kerneldrv
63-
- name: Install envtest tool and run envtest
64-
run: |
65-
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
66-
setup-envtest use ${K8S_VERSION}
67-
- run: |
68-
KUBEBUILDER_ASSETS=$(setup-envtest use -i -p path ${K8S_VERSION}) make envtest
6961
- run: make check-github-actions
7062
- name: Codecov report
7163
run: bash <(curl -s https://codecov.io/bash)
64+
65+
envtest:
66+
name: Test APIs using envtest
67+
runs-on: ubuntu-22.04
68+
strategy:
69+
matrix:
70+
version:
71+
- 1.26.x
72+
- 1.27.x
73+
- 1.28.x
74+
steps:
75+
- uses: actions/checkout@v4
76+
- uses: actions/setup-go@v4
77+
- name: Install envtest and k8s control plane
78+
run: |
79+
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
80+
setup-envtest use ${{ matrix.version }}
81+
- name: Run envtest
82+
run: |
83+
KUBEBUILDER_ASSETS=$(setup-envtest use -i -p path ${{ matrix.version }}) make envtest

0 commit comments

Comments
 (0)