Skip to content

feat(e2e): add additional persistence e2e test #641

feat(e2e): add additional persistence e2e test

feat(e2e): add additional persistence e2e test #641

Workflow file for this run

name: E2E tests
on:
push:
branches:
- master
- "release-[0-9]+.[0-9]+*"
pull_request:
env:
KUBECTL_VERSION: 'v1.26.6'
jobs:
build:
name: Image build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and export
uses: docker/build-push-action@v6
with:
context: .
tags: controller:local
cache-from: type=gha
cache-to: type=gha,mode=max
outputs: type=docker,dest=/tmp/controller.tar
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: controller
path: /tmp/controller.tar
chart:
name: Shell script tests with chart install
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
kube: ["1.29", "1.30", "1.31"]
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: controller
path: /tmp
- name: Load image
run: |
docker load --input /tmp/controller.tar
docker image ls -a
- name: Set up kubectl
uses: azure/setup-kubectl@v4.0.0
with:
version: ${{ env.KUBECTL_VERSION }}
- name: Checkout code
uses: actions/checkout@v4
# See https://github.com/kubernetes-sigs/kind/releases/tag/v0.20.0
- name: Determine KinD node image version
id: node_image
run: |
case ${{ matrix.kube }} in
1.29)
NODE_IMAGE=kindest/node:v1.29.4@sha256:ea40a6bd365a17f71fd3883a1d34a0791d7d6b0eb75832c6d85b6f2326827f1e ;;
1.30)
NODE_IMAGE=kindest/node:v1.30.0@sha256:2af5d1b382926abcd6336312d652cd045b7cc47475844a608669c71b1fefcfbc ;;
1.31)
NODE_IMAGE=kindest/node:v1.31.0@sha256:53df588e04085fd41ae12de0c3fe4c72f7013bba32a20e7325357a1ac94ba865 ;;
esac
echo "image=$NODE_IMAGE" >> $GITHUB_OUTPUT
- name: Make setup
run: make kind-cluster stern
env:
KIND_IMAGE: ${{ steps.node_image.outputs.image }}
- name: Test
run: e2e/e2e_test.sh
- name: Print last 10k kubernetes logs from default, collector and example-tenant-ns namespaces
if: always()
run: |
mkdir -p build/_test
bin/stern -n default,collector,example-tenant-ns ".*" --tail 100000 --no-follow > build/_test/cluster.logs
- name: Archive Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: script-e2e-test-cluster-logs-${{ matrix.kube }}
path: build/_test
retention-days: 5