Merge pull request #28 from uselagoon/action-updates #96
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Aergia Controller Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test-suite: | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
fail-fast: false | |
matrix: | |
kindest_node_version: [v1.25.16, v1.26.14, v1.27.11] | |
experimental: [false] | |
include: | |
- kindest_node_version: v1.28.9 | |
experimental: true | |
- kindest_node_version: v1.29.4 | |
experimental: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: "0" | |
- name: Set up testing dependencies | |
run: sudo apt-get update && sudo apt-get -y install build-essential && sudo apt-get clean | |
- name: Setup correct Go version | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.21' | |
- name: Install kustomize, kubebuilder, helm | |
run: | | |
#kubebuilder | |
curl -sL https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.3.2/kubebuilder_2.3.2_linux_amd64.tar.gz | tar -xz -C /tmp/ | |
sudo mkdir -p /usr/local/kubebuilder/bin | |
sudo mv /tmp/kubebuilder_2.3.2_linux_amd64/bin/* /usr/local/kubebuilder/bin | |
chmod +x /usr/local/kubebuilder/bin/* | |
echo "/usr/local/kubebuilder/bin" >> $GITHUB_PATH | |
- name: Check go, kustomize, kubebuilder, helm, docker-compose, kind versions | |
run: | | |
go version | |
kustomize version | |
helm version | |
kubebuilder version | |
kind version | |
- name: Create kind cluster | |
uses: helm/[email protected] | |
with: | |
version: v0.22.0 | |
node_image: kindest/node:${{ matrix.kindest_node_version }} | |
config: test-resources/kind-cluster.yaml | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
load: true | |
tags: testlagoon/aergia:test-tag | |
- name: Run Tests | |
run: | | |
kind load docker-image testlagoon/aergia:test-tag --name chart-testing | |
make controller-test |