forked from kubernetes-client/java
-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (95 loc) · 3.23 KB
/
maven.yml
File metadata and controls
99 lines (95 loc) · 3.23 KB
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
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
verify-format:
runs-on: ubuntu-latest
name: Verify Source Format
steps:
- uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 8.0.x
- name: Verify Format and License
run: mvn spotless:check
build:
runs-on: ubuntu-latest
name: Java ${{ matrix.java }} Maven Test
strategy:
matrix:
# test against latest update of each major Java version, as well as specific updates of LTS versions:
java: [ 8.0.x, 9.0.x, 10.0.x, 11.0.x, 12.0.x, 13.0.x ]
steps:
- uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn -q test -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
build-graalvm:
runs-on: ubuntu-latest
name: GraalVM Maven Test
steps:
- uses: actions/checkout@v2
- uses: DeLaGuardo/setup-graalvm@8bbfe44ef9c6f5c07e5af036a1bffd561c037d18
with:
graalvm-version: '19.3.0.java8'
- name: Build with Maven
run: mvn -q test -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
e2e:
runs-on: ubuntu-latest
name: End-to-End Test Against Real Cluster
steps:
- uses: actions/checkout@v2
- name: Create k8s Kind Cluster
uses: helm/kind-action@v1.1.0
- name: Run E2E with Maven
run: |
mvn clean install \
-q \
-Dmaven.test.skip=true
cd e2e
mvn test \
-B \
-De2e.skip=false \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
codegen:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
name: CRD Java Models Code Generation
steps:
- uses: actions/checkout@v2
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: kubernetes-client/java/crd-model-gen
tags: gh-action-tmp
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
workdir: client-java-contrib
no_push: true
- name: Run Code-gen for Cert-Manager
working-directory: ${{ github.workspace }}/client-java-contrib/cert-manager
run: IMAGE_TAG=gh-action-tmp ./update.sh
- name: Run Code-gen for Prometheus-Operator
working-directory: ${{ github.workspace }}/client-java-contrib/prometheus-operator
run: IMAGE_TAG=gh-action-tmp ./update.sh