-
Notifications
You must be signed in to change notification settings - Fork 98
146 lines (142 loc) · 5.51 KB
/
maven.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: Arquillian Cube Test
on:
push:
branches:
- main
pull_request:
branches:
- main
paths-ignore:
- 'docs/**'
jobs:
docker-it:
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
java: ['11']
steps:
- name: Checkout arquillian-cube
uses: actions/checkout@v4
- name: Cache .m2 registry
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: docker-it-cache-e2e-${{ github.sha }}-${{ github.run_id }}
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Maven pre-fetch dependencies ${{ matrix.java }}
run: |
./mvnw clean install -q -U -DskipTests
- name: Build and run integration tests for Docker target (${{ matrix.java }})
run: |
./mvnw verify -B -Dfailsafe.groups=org.arquillian.cube.docker.impl.requirement.RequiresDocker -Dcontainerless.skip.tests=true
- uses: actions/upload-artifact@v4
with:
name: docker-it-surefire-reports-jdk-${{ matrix.java }}
path: |
'${{ github.workspace }}/**/surefire-reports/*.*'
'${{ github.workspace }}/**/*.log'
k8s-it:
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
java: ['11']
steps:
- name: Checkout arquillian-cube
uses: actions/checkout@v4
- name: Setup Minikube
uses: manusa/[email protected]
with:
driver: docker
container runtime: containerd
minikube version: 'v1.32.0'
kubernetes version: 'v1.30.0'
github token: ${{ secrets.GITHUB_TOKEN }}
start args: "--memory='4gb' --cpus='2'"
- name: Enable minikube registry
run: |
minikube addons enable registry
kubectl port-forward --namespace kube-system service/registry 5000:80 &
- name: Cache .m2 registry
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: k8s-it-cache-e2e-${{ github.sha }}-${{ github.run_id }}
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Maven pre-fetch dependencies ${{ matrix.java }}
run: |
./mvnw clean install -q -U -DskipTests
- name: Build and run integration tests for Kubernetes target (${{ matrix.java }})
run: |
./mvnw verify -B -Dfailsafe.groups=org.arquillian.cube.kubernetes.impl.requirement.RequiresKubernetes -Dcontainerless.skip.tests=true
- uses: actions/upload-artifact@v4
with:
name: k8s-it-surefire-reports-jdk-${{ matrix.java }}
path: |
'${{ github.workspace }}/**/surefire-reports/*.*'
'${{ github.workspace }}/**/*.log'
- name: Stop minikube
run: |
minikube stop
openshift-it:
runs-on: ubuntu-20.04
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
java: ['11']
steps:
- name: Checkout arquillian-cube
uses: actions/checkout@v4
- name: Setup OpenShift
uses: manusa/[email protected]
with:
oc version: 'v3.10.0'
github token: ${{ secrets.GITHUB_TOKEN }}
# TODO - there are issues when installing OLM on OpenShift v3, and we're aiming at having CI running on OpenShift 4, actually...
# - name: Setup OLM on OpenShift v3.z
# run: |
# set -x
# # operator-sdk must be installed manually on OpenShift v3
# oc version
# oc create -f https://github.com/operator-framework/operator-lifecycle-manager/tree/master/deploy/upstream/manifests/0.6.0/
# # OR...
# 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: Cache .m2 registry
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: openshift-it-cache-e2e-${{ github.sha }}-${{ github.run_id }}
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Maven pre-fetch dependencies ${{ matrix.java }}
run: |
./mvnw clean install -q -U -DskipTests
- name: Build and run integration tests for OpenShift target (${{ matrix.java }})
run: |
./mvnw verify -B -Dfailsafe.groups=org.arquillian.cube.openshift.impl.requirement.RequiresOpenshift -Dfailsafe.excludedGroups=org.arquillian.cube.openshift.impl.requirement.RequiresOpenshift4 -Dcontainerless.skip.tests=true
- uses: actions/upload-artifact@v4
with:
name: openshift-it-surefire-reports-jdk-${{ matrix.java }}
path: |
'${{ github.workspace }}/**/surefire-reports/*.*'
'${{ github.workspace }}/**/*.log'