chore(deps): update all dependencies #2651
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: E2E tests | |
on: | |
push: | |
branches: | |
- master | |
- "release-[0-9]+.[0-9]+*" | |
pull_request: | |
env: | |
GO_VERSION: '1.23' | |
KUBECTL_VERSION: 'v1.26.6' | |
jobs: | |
build: | |
name: Image build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 | |
- name: Build and export | |
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0 | |
with: | |
context: . | |
tags: controller:local | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
outputs: type=docker,dest=/tmp/controller.tar | |
target: e2e-test | |
build-args: | | |
GO_BUILD_FLAGS=-cover -covermode=atomic | |
- name: Upload artifact | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: controller | |
path: /tmp/controller.tar | |
go: | |
name: Go end2end tests | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
fail-fast: false | |
# matrix: | |
# SHARD: [0] | |
# SHARDS: [1] | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 | |
- name: Download artifact | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: controller | |
path: /tmp | |
- name: Load image | |
run: | | |
docker load --input /tmp/controller.tar | |
docker image ls -a | |
- name: Set up Go | |
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Set up kubectl | |
uses: azure/setup-kubectl@v3 | |
with: | |
version: ${{ env.KUBECTL_VERSION }} | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Run e2e tests | |
run: make test-e2e-ci | |
# env: | |
# SHARD: ${{ matrix.SHARD }} | |
# SHARDS: ${{ matrix.SHARDS }} | |
- name: Test Coverage | |
uses: vladopajic/go-test-coverage@661e46779fd602ce29d4a4e32fb3a27bce71903c # v2.11.0 | |
with: | |
profile: ./build/_test_coverage/coverage_e2e.out | |
- name: Archive Test Results | |
if: always() | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: go-e2e-test-cluster-logs | |
path: build/_test | |
retention-days: 5 | |
chart: | |
name: Shell script tests with chart install | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
kube: ["1.26", "1.27", "1.28", "1.29", "1.30", "1.31"] | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1 | |
- name: Download artifact | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
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@3e0aec4d80787158d308d7b364cb1b702e7feb7f # v4.0.0 | |
with: | |
version: ${{ env.KUBECTL_VERSION }} | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
# 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.26) | |
NODE_IMAGE=kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb ;; | |
1.27) | |
NODE_IMAGE=kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72 ;; | |
1.28) | |
NODE_IMAGE=kindest/node:v1.28.9@sha256:9ba4d311e7861d27b210e5960e5ce921a7c53d3c67e0545fd8a1cb9a76dfa2cb ;; | |
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: hack/test.sh | |
- name: Print last 10k kubernetes logs from default and logging namespaces | |
if: always() | |
run: | | |
mkdir -p build/_test | |
bin/stern -n default,logging ".*" --tail 100000 --no-follow > build/_test/cluster.logs | |
- name: Archive Test Results | |
if: always() | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: script-e2e-test-cluster-logs-${{ matrix.kube }} | |
path: build/_test | |
retention-days: 5 |