Skip to content

Commit 867a8fb

Browse files
Moritz Clasmeierclaude
andcommitted
Add kind-based e2e tests to CI
Add a reusable e2e-tests-kind.yml workflow that creates a kind cluster and runs the e2e test suite against it. The roxie binary is extracted from the already-built image. OLM tests are skipped since kind has no OLM. Wire the new job into both PR and main-push workflows, running in parallel with the existing GKE-based e2e tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f7cb07b commit 867a8fb

3 files changed

Lines changed: 86 additions & 0 deletions

File tree

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: E2E Tests (kind)
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
image:
7+
required: true
8+
type: string
9+
10+
env:
11+
REGISTRY: quay.io
12+
IMAGE_NAME: rhacs-eng/roxie
13+
14+
jobs:
15+
e2e-tests-kind:
16+
runs-on: ubuntu-latest
17+
env:
18+
SKIP_OLM_TESTS: "true"
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v6
22+
with:
23+
fetch-depth: 0
24+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
25+
26+
- name: Set up Go
27+
uses: actions/setup-go@v6
28+
with:
29+
go-version-file: go.mod
30+
cache: true
31+
32+
- name: Log in to Quay.io
33+
uses: docker/login-action@v3
34+
with:
35+
registry: ${{ env.REGISTRY }}
36+
username: ${{ secrets.REGISTRY_USERNAME }}
37+
password: ${{ secrets.REGISTRY_TOKEN }}
38+
39+
- name: Extract roxie binary from image
40+
run: |
41+
docker create --name roxie-extract "${{ inputs.image }}"
42+
docker cp roxie-extract:/usr/local/bin/roxie "$GITHUB_WORKSPACE/roxie"
43+
docker rm roxie-extract
44+
45+
- name: Install roxie binary
46+
run: |
47+
cp "${GITHUB_WORKSPACE}/roxie" /usr/local/bin/roxie
48+
chmod +x /usr/local/bin/roxie
49+
roxie version
50+
51+
- name: Install roxctl
52+
env:
53+
ROXCTL_VERSION: "4.10.0"
54+
ROXCTL_SHA256: "5db647b14569465866c0162522e83393ebf02f671f4556b1b3ed551b9f8433bc"
55+
run: |
56+
curl -fsSLo /usr/local/bin/roxctl \
57+
"https://mirror.openshift.com/pub/rhacs/assets/${ROXCTL_VERSION}/bin/Linux/roxctl"
58+
echo "${ROXCTL_SHA256} /usr/local/bin/roxctl" | sha256sum -c -
59+
chmod +x /usr/local/bin/roxctl
60+
roxctl version
61+
62+
- name: Create kind cluster
63+
uses: helm/kind-action@v1
64+
with:
65+
cluster_name: roxie-e2e
66+
67+
- name: Run e2e tests
68+
env:
69+
REGISTRY_USERNAME: ${{ secrets.QUAY_RHACS_ENG_RO_USERNAME }}
70+
REGISTRY_PASSWORD: ${{ secrets.QUAY_RHACS_ENG_RO_PASSWORD }}
71+
run: |
72+
make run-test-e2e

.github/workflows/main-push.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ jobs:
3535
image: ${{ needs.build-roxie-image.outputs.image }}
3636
secrets: inherit
3737

38+
e2e-tests-kind:
39+
needs: [ build-roxie-image ]
40+
uses: ./.github/workflows/e2e-tests-kind.yml
41+
with:
42+
image: ${{ needs.build-roxie-image.outputs.image }}
43+
secrets: inherit
44+
3845
delete-dev-cluster:
3946
if: ${{ always() && needs.create-dev-cluster.result == 'success' }}
4047
needs: [ create-dev-cluster, e2e-tests ]

.github/workflows/pr.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,10 @@ jobs:
8686
with:
8787
cluster-name: ${{ needs.create-openshift-cluster.outputs.cluster-name }}
8888
secrets: inherit
89+
90+
e2e-tests-kind:
91+
needs: [ build-roxie-image ]
92+
uses: ./.github/workflows/e2e-tests-kind.yml
93+
with:
94+
image: ${{ needs.build-roxie-image.outputs.image }}
95+
secrets: inherit

0 commit comments

Comments
 (0)