-
Notifications
You must be signed in to change notification settings - Fork 98
71 lines (68 loc) · 2.16 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
name: Arquillian Cube Test
on:
push:
branches:
- main
pull_request:
branches:
- main
paths-ignore:
- 'doc/**'
- '.circleci/**'
env:
# failsafe.groups configuration depends on the env setup.
FAILSAFE_GROUPS: ''
DOCKER_HOST: 'unix:///var/run/docker.sock'
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
java: ['11']
steps:
- 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'"
env:
FAILSAFE_GROUPS: "-Dfailsafe.groups=\"org.arquillian.cube.docker.impl.requirement.RequiresDocker,org.arquillian.cube.kubernetes.impl.requirement.RequiresKubernetes\""
- name: Enable minikube registry
run: |
minikube addons enable registry
kubectl port-forward --namespace kube-system service/registry 5000:80 &
- name: Checkout arquillian-cube
uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
- name: Maven pre-fetch dependencies ${{ matrix.java }}
run: |
./mvnw verify -q -U -DskipTests # pre-fetch dependencies
- name: Build with Maven Java ${{ matrix.java }}
run: |
./mvnw -fae clean package ${{ env.FAILSAFE_GROUPS }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: surefire-reports-jdk-${{ matrix.java }}
path: |
'${{ github.workspace }}/**/surefire-reports/*.*'
'${{ github.workspace }}/**/*.log'
- name: Stop minikube
run: |
minikube stop