-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (44 loc) · 1.3 KB
/
k8scompat.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Kubernetes Version Compatibility Tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
env:
upstreamApiserverVersion: 1.28.x
strategy:
fail-fast: false
matrix:
downstreamApiserverMinorVersion:
- "28"
- "27"
- "26"
- "25"
- "24"
- "23"
- "22"
- "21"
- "20"
- "19"
- "17"
- "16"
- "15"
- "14"
- "13"
- "12"
- "11"
- "10"
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Download kubebuilder assets
run: |
echo "UPSTREAM_KUBEBUILDER_ASSETS=$(go run sigs.k8s.io/controller-runtime/tools/setup-envtest@latest use -p path '${{ env.upstreamApiserverVersion }})'" >> $GITHUB_ENV
echo "DOWNSTREAM_KUBEBUILDER_ASSETS=$(go run sigs.k8s.io/controller-runtime/tools/setup-envtest@latest use -p path '1.${{ matrix.downstreamApiserverMinorVersion }}).x'" >> $GITHUB_ENV
- name: Run tests
run: go test -v ./internal/controllers/reconciliation
env:
KUBEBUILDER_ATTACH_CONTROL_PLANE_OUTPUT: "true"
DOWNSTREAM_VERSION_MINOR: "${{ matrix.downstreamApiserverMinorVersion }}"