Skip to content

Commit 5bbcf30

Browse files
authored
[ci] Verify supported JDK versions on master push (#7085)
1 parent 930c622 commit 5bbcf30

2 files changed

Lines changed: 81 additions & 0 deletions

File tree

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Check Supported Java Versions
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
build:
9+
name: Build on JDK ${{ matrix.java }} and ${{ matrix.os }}
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
java: [8, 11]
14+
os: [ubuntu-latest]
15+
include:
16+
- java: 8
17+
os: windows-latest
18+
- java: 13
19+
os: ubuntu-latest
20+
# Need to update to Gradle version with v13 support in modules/openapi-generator-gradle-plugin/pom.xml
21+
flags: -am -pl modules/openapi-generator-cli
22+
steps:
23+
- name: Check out code
24+
uses: actions/checkout@v2
25+
26+
- name: Set up JDK ${{ matrix.java }}
27+
uses: actions/setup-java@v1
28+
with:
29+
java-version: ${{ matrix.java }}
30+
31+
- uses: actions/cache@v1
32+
with:
33+
path: ~/.m2/repository
34+
key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml', 'modules/**/pom.xml') }}
35+
restore-keys: |
36+
${{ runner.os }}-maven-
37+
38+
- uses: actions/cache@v2
39+
with:
40+
path: |
41+
~/.gradle/caches
42+
~/.gradle/wrapper
43+
key: ${{ runner.os }}-gradle-${{ hashFiles('modules/openapi-generator-gradle-plugin/pom.xml') }}
44+
restore-keys: |
45+
${{ runner.os }}-gradle-
46+
47+
- name: Build with Maven
48+
shell: bash
49+
run: mvn -nsu -B --quiet -Djacoco.skip=true -Dorg.slf4j.simpleLogger.defaultLogLevel=error --no-transfer-progress clean install --file pom.xml ${{ matrix.flags }}
50+
51+
- name: Test gradle
52+
shell: bash
53+
run: gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace
54+
55+
- name: Upload Maven build artifact
56+
uses: actions/upload-artifact@v1
57+
if: matrix.java == '8'
58+
with:
59+
name: artifact
60+
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar
61+
62+
verify:
63+
name: Verifies integrity of the commit on ${{ matrix.os }}
64+
needs: build
65+
runs-on: ${{ matrix.os }}
66+
strategy:
67+
matrix:
68+
os: [ubuntu-latest, windows-latest]
69+
steps:
70+
- name: Check out code
71+
uses: actions/checkout@v2
72+
- name: Download build artifact
73+
uses: actions/download-artifact@v1
74+
with:
75+
name: artifact
76+
- name: Run Ensures Script
77+
run: |
78+
mkdir -p modules/openapi-generator-cli/target/
79+
mv artifact/openapi-generator-cli.jar modules/openapi-generator-cli/target/
80+
./bin/utils/ensure-up-to-date

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
99
[![JDK11 Build](https://cloud.drone.io/api/badges/OpenAPITools/openapi-generator/status.svg?ref=refs/heads/master)](https://cloud.drone.io/OpenAPITools/openapi-generator)
1010
[![iOS Build Status](https://app.bitrise.io/app/4a2b10a819d12b67/status.svg?token=859FMDR8QHwabCzwvZK6vQ&branch=master)](https://app.bitrise.io/app/4a2b10a819d12b67)
11+
![Check Supported Java Versions](https://github.com/openapi-generator/openapi-generator/workflows/Check%20Supported%20Java%20Versions/badge.svg)
1112

1213
</div>
1314

0 commit comments

Comments
 (0)