Skip to content

Commit 1d2b8da

Browse files
committed
ci: add CI workflow for java sample and fix integration test
1 parent f949249 commit 1d2b8da

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

.github/workflows/java-ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Java Sample
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
workflow_dispatch:
11+
12+
jobs:
13+
buildTest:
14+
name: Build JDK ${{ matrix.java }}
15+
runs-on: ubuntu-latest
16+
continue-on-error: true # allow jobs to complete even if some fail
17+
strategy:
18+
matrix:
19+
include:
20+
- java: 8
21+
gradle: 7.6.4
22+
- java: 11
23+
gradle: 7.6.4
24+
- java: 17
25+
gradle: 8.9
26+
- java: 21
27+
gradle: 8.9
28+
steps:
29+
- name: Setup Maven Action
30+
31+
with:
32+
checkout-fetch-depth: 0
33+
java-version: ${{ matrix.java }}
34+
java-distribution: temurin
35+
- name: Install latest jsonschema2pojo SNAPSHOT
36+
run: ./mvnw -U -B install -DskipTests -Dmaven.javadoc.skip -Dmaven.site.skip
37+
- name: Setup Gradle
38+
uses: gradle/actions/setup-gradle@v4
39+
with:
40+
gradle-version: ${{ matrix.gradle }}
41+
- name: Build projects
42+
run: cd jsonschema2pojo-gradle-plugin/example/java && gradle --stacktrace build

jsonschema2pojo-gradle-plugin/pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@
153153
<configuration>
154154
<useFile>false</useFile>
155155
<testSourceDirectory>${integrationTestSourceDirectory}</testSourceDirectory>
156+
<systemPropertyVariables>
157+
<it.gradle.version>${gradle.version}</it.gradle.version>
158+
</systemPropertyVariables>
156159
</configuration>
157160
</plugin>
158161
<plugin>

0 commit comments

Comments
 (0)