-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (51 loc) · 1.51 KB
/
compatibility.yml
File metadata and controls
58 lines (51 loc) · 1.51 KB
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
49
50
51
52
53
54
55
56
57
58
name: Compatibility
on:
schedule:
- cron: "0 8 * * 1" # Every Monday at 08:00 UTC
workflow_dispatch:
pull_request:
types: [labeled]
jobs:
compatibility:
if: >-
github.event_name != 'pull_request' ||
github.event.label.name == 'compatibility'
name: "CR v${{ matrix.controller-runtime }} / k8s v${{ matrix.k8s }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- controller-runtime: "0.23"
cr-version: "v0.23.3"
k8s: "0.35"
k8s-version: "v0.35.2"
current: true
- controller-runtime: "0.22"
cr-version: "v0.22.0"
k8s: "0.34"
k8s-version: "v0.34.0"
current: false
steps:
- name: Clone the code
uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Swap dependencies
if: ${{ !matrix.current }}
run: |
go get \
sigs.k8s.io/controller-runtime@${{ matrix.cr-version }} \
k8s.io/api@${{ matrix.k8s-version }} \
k8s.io/apimachinery@${{ matrix.k8s-version }} \
k8s.io/client-go@${{ matrix.k8s-version }} \
k8s.io/apiextensions-apiserver@${{ matrix.k8s-version }}
go mod tidy
- name: Verify compilation
run: go build ./...
- name: Build examples
run: make build-examples
- name: Run tests
run: make test