-
Notifications
You must be signed in to change notification settings - Fork 14
76 lines (73 loc) · 2.73 KB
/
kubernetes-e2e.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Kubernetes E2E Tests
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
paths-ignore:
- 'docs/**'
- 'ide-config/**'
- '**.md'
concurrency:
# Only run once for latest commit per ref and cancel other (previous) runs.
group: ci-e2e-intersmash-${{ github.ref }}
cancel-in-progress: true
jobs:
minikube:
name: K8S
runs-on: ubuntu-latest
if: github.repository == 'Intersmash/intersmash'
strategy:
fail-fast: false
matrix:
kubernetes: [v1.31.0] #, v1.30.0]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Start minikube
uses: medyagh/setup-minikube@latest
with:
kubernetes-version: ${{ matrix.kubernetes }}
- name: Install operator-sdk
run: |
set -x
#
# operator-sdk must be installed manually on K8s
#
export ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(uname -m) ;; esac)
export OS=$(uname | awk '{print tolower($0)}')
export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/v1.37.0
curl -LO ${OPERATOR_SDK_DL_URL}/operator-sdk_${OS}_${ARCH}
chmod +x operator-sdk_${OS}_${ARCH} && sudo mv operator-sdk_${OS}_${ARCH} /usr/local/bin/operator-sdk
operator-sdk olm install
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Install and Run Integration Tests
run: |
set -x
#
mkdir local-repo
# pre-fetch dependencies
mvn clean install -pl kubernetes-client,core,provisioners,testsuite,testsuite/deployments,testsuite/deployments/deployments-provider -am --batch-mode -Dmaven.repo.local=./local-repo -DskipTests
# run K8s integration tests
mvn test -e --batch-mode -fae -Dmaven.repo.local=./local-repo -pl testsuite/integration-tests -Pts.k8s \
-Dintersmash.kubernetes.url=https://$(minikube ip):8443 \
-Dintersmash.kubernetes.route_domain=$(minikube ip) \
-Dintersmash.kubernetes.hostname=$(minikube ip) \
-Dintersmash.kubernetes.namespace=test-k8s-1 \
-Dintersmash.olm.operators.catalog_source=operatorhubio-catalog \
-Dintersmash.olm.operators.namespace=olm \
-Dintersmash.hyperfoil.operators.catalog_source=operatorhubio-catalog
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: logs-${{ matrix.kubernetes }}
path: |
**/log/*
**/target/surefire-reports/*