-
Notifications
You must be signed in to change notification settings - Fork 6
94 lines (91 loc) · 2.68 KB
/
pr.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
name: Verify Pull Request
env:
MAVEN_ARGS: -V -ntp -e
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
on:
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17 ]
distribution: [ temurin ]
steps:
- uses: actions/checkout@v4
- name: Set up Java and Maven
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Check code format
run: |
./mvnw ${MAVEN_ARGS} spotless:check --file pom.xml
- name: Run unit tests
run: ./mvnw ${MAVEN_ARGS} -B test --file pom.xml
spring-boot-e2e-tests:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
java: [ 17 ]
distribution: [ temurin ]
steps:
- uses: actions/checkout@v4
- name: Set up Java and Maven
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Setup Minikube-Kubernetes
uses: manusa/[email protected]
with:
minikube version: v1.25.2
kubernetes version: v1.23.6
github token: ${{ secrets.GITHUB_TOKEN }}
driver: docker
- name: Run E2E Test
run: |
set -x
eval $(minikube -p minikube docker-env)
./mvnw ${MAVEN_ARGS} clean install -DskipTests
cd samples/spring-boot
pwd
./mvnw ${MAVEN_ARGS} jib:dockerBuild -DskipTests
./mvnw ${MAVEN_ARGS} test -Pend-to-end-tests
quarkus-e2e-tests:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
java: [ 17 ]
distribution: [ temurin ]
steps:
- uses: actions/checkout@v4
- name: Set up Java and Maven
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Setup Minikube-Kubernetes
uses: manusa/[email protected]
with:
minikube version: v1.25.2
kubernetes version: v1.23.6
github token: ${{ secrets.GITHUB_TOKEN }}
driver: docker
- name: Run E2E Test
run: |
set -x
eval $(minikube -p minikube docker-env)
./mvnw clean install -DskipTests
cd samples/quarkus
./mvnw install -Dquarkus.container-image.build=true -DskipTests
./mvnw ${MAVEN_ARGS} test -Pend-to-end-tests