Skip to content

Workflow file for this run

name: Kubernetes Version Compatibility Tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
env:
APISERVER_VERSION: 1.28.x
strategy:
matrix:
upstreamApiserverVersion:
- "1.28.x"
- "1.27.x"
- "1.26.x"
# - "1.25.x"
# - "1.24.x"
# - "1.23.x"
# - "1.22.x"
# - "1.21.x"
# - "1.20.x"
# - "1.19.x"
# - "1.17.x"
# - "1.16.x"
# - "1.15.x"
# - "1.14.x"
# - "1.13.x"
# - "1.12.x"
# - "1.11.x"
# - "1.10.x"
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Download kubebuilder assets
id: kubebuilder-assets
run: |
echo "::set-output name=dir::$(go run sigs.k8s.io/controller-runtime/tools/setup-envtest@latest use -p path $APISERVER_VERSION)"
echo "::set-output name=upstream-dir::$(go run sigs.k8s.io/controller-runtime/tools/setup-envtest@latest use -p path ${{ matrix.upstreamApiserverVersion }})"
- name: Cache kubebuilder assets
uses: actions/cache@v2
with:
path: ${{ steps.kubebuilder-assets.dir }}
key: ${{ env.APISERVER_VERSION }}
- name: Cache upstream kubebuilder assets
uses: actions/cache@v2
with:
path: ${{ steps.kubebuilder-assets.upstream-dir }}
key: ${{ matrix.upstreamApiserverVersion }}
- name: Run tests
run: go test -v ./internal/controllers/reconciliation
env:
KUBEBUILDER_ASSETS: ${{ steps.kubebuilder-assets.dir }}
UPSTREAM_KUBEBUILDER_ASSETS: ${{ steps.kubebuilder-assets.upstream-dir }}