-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (49 loc) · 1.39 KB
/
generator-verify.yaml
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
name: Verify generated SDK
on:
pull_request:
branches:
- 'main'
concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true
jobs:
generate-sdk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- id: build-with-maven
working-directory: generator
run: mvn clean install -P github-generate-action-profile
- name: Generate SDK Files
working-directory: generator/openapi
run: |
mvn clean install
mvn exec:java "-Dnamespace=exemplar" "-DsdkVersion=1.0.0" "-Dspec=./src/test/resources/exemplar.yaml"
- uses: actions/upload-artifact@v3
with:
name: sdk
path: generator/openapi/target/sdk
verify-generated-sdk:
runs-on: ubuntu-latest
needs: generate-sdk
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: sdk
path: generator/openapi/target/sdk
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Set up parent
run: mvn clean install
- name: verify generated sdk
working-directory: generator/openapi/target/sdk
run: mvn verify