mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-10-14 08:23:45 +00:00
Test Java clients with Petstore server in Github workflow (#22003)
* test java clients with petstore in github workflow * update * clean up
This commit is contained in:
parent
3a63c2f7d2
commit
f1a273de16
12
.github/workflows/samples-java-client-jdk11.yaml
vendored
12
.github/workflows/samples-java-client-jdk11.yaml
vendored
@ -17,6 +17,10 @@ on:
|
|||||||
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
|
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
|
||||||
- samples/client/others/java/jersey2-oneOf-duplicates/**
|
- samples/client/others/java/jersey2-oneOf-duplicates/**
|
||||||
- samples/client/others/java/jersey2-oneOf-Mixed/**
|
- samples/client/others/java/jersey2-oneOf-Mixed/**
|
||||||
|
- samples/client/petstore/java/jersey3-oneOf/**
|
||||||
|
- samples/client/others/java/okhttp-gson-streaming/**
|
||||||
|
- samples/client/others/java/resteasy/**
|
||||||
|
- samples/client/others/java/apache-httpclient/**
|
||||||
- samples/client/others/java/resttemplate-list-schema-validation/**
|
- samples/client/others/java/resttemplate-list-schema-validation/**
|
||||||
- samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/**
|
- samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/**
|
||||||
pull_request:
|
pull_request:
|
||||||
@ -35,6 +39,10 @@ on:
|
|||||||
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
|
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
|
||||||
- samples/client/others/java/jersey2-oneOf-duplicates/**
|
- samples/client/others/java/jersey2-oneOf-duplicates/**
|
||||||
- samples/client/others/java/jersey2-oneOf-Mixed/**
|
- samples/client/others/java/jersey2-oneOf-Mixed/**
|
||||||
|
- samples/client/petstore/java/jersey3-oneOf/**
|
||||||
|
- samples/client/others/java/okhttp-gson-streaming/**
|
||||||
|
- samples/client/others/java/resteasy/**
|
||||||
|
- samples/client/others/java/apache-httpclient/**
|
||||||
- samples/client/others/java/resttemplate-list-schema-validation/**
|
- samples/client/others/java/resttemplate-list-schema-validation/**
|
||||||
- samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/**
|
- samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/**
|
||||||
jobs:
|
jobs:
|
||||||
@ -97,6 +105,10 @@ jobs:
|
|||||||
- samples/client/others/java/jersey2-oneOf-Mixed/
|
- samples/client/others/java/jersey2-oneOf-Mixed/
|
||||||
- samples/client/others/java/resttemplate-list-schema-validation/
|
- samples/client/others/java/resttemplate-list-schema-validation/
|
||||||
- samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/
|
- samples/client/petstore/java/okhttp-gson-3.1-duplicated-operationid/
|
||||||
|
- samples/client/petstore/java/jersey3-oneOf/
|
||||||
|
- samples/client/others/java/okhttp-gson-streaming/
|
||||||
|
- samples/client/petstore/java/resteasy/
|
||||||
|
- samples/client/petstore/java/apache-httpclient/
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- uses: actions/setup-java@v5
|
- uses: actions/setup-java@v5
|
||||||
|
65
.github/workflows/samples-java-petsore-client-jdk11.yaml
vendored
Normal file
65
.github/workflows/samples-java-petsore-client-jdk11.yaml
vendored
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
# run java client tests with petstore server
|
||||||
|
name: Samples Java Petsore Client JDK11
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- samples/client/petstore/java/jersey2-java8/**
|
||||||
|
- samples/openapi3/client/petstore/java/jersey2-java8/**
|
||||||
|
- samples/client/petstore/java/jersey3/**
|
||||||
|
- samples/client/petstore/java/okhttp-gson/**
|
||||||
|
- samples/client/petstore/java/okhttp-gson-3.1/**
|
||||||
|
- samples/client/petstore/java/okhttp-gson-dynamicOperations/**
|
||||||
|
- samples/client/petstore/java-micronaut-client/**
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- samples/client/petstore/java/jersey2-java8/**
|
||||||
|
- samples/openapi3/client/petstore/java/jersey2-java8/**
|
||||||
|
- samples/client/petstore/java/jersey3/**
|
||||||
|
- samples/client/petstore/java/okhttp-gson/**
|
||||||
|
- samples/client/petstore/java/okhttp-gson-3.1/**
|
||||||
|
- samples/client/petstore/java/okhttp-gson-dynamicOperations/**
|
||||||
|
- samples/client/petstore/java-micronaut-client/**
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build Java Client JDK11
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
sample:
|
||||||
|
- samples/client/petstore/java/jersey2-java8
|
||||||
|
- samples/openapi3/client/petstore/java/jersey2-java8
|
||||||
|
- samples/client/petstore/java/jersey3
|
||||||
|
- samples/client/petstore/java/okhttp-gson
|
||||||
|
- samples/client/petstore/java/okhttp-gson-3.1
|
||||||
|
- samples/client/petstore/java/okhttp-gson-dynamicOperations
|
||||||
|
- samples/client/petstore/java-micronaut-client
|
||||||
|
services:
|
||||||
|
petstore-api:
|
||||||
|
image: swaggerapi/petstore
|
||||||
|
ports:
|
||||||
|
- 80:8080
|
||||||
|
env:
|
||||||
|
SWAGGER_HOST: http://petstore.swagger.io
|
||||||
|
SWAGGER_BASE_PATH: /v2
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v5
|
||||||
|
- name: Add hosts to /etc/hosts
|
||||||
|
run: |
|
||||||
|
sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts
|
||||||
|
- uses: actions/setup-java@v5
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: 11
|
||||||
|
- name: Cache maven dependencies
|
||||||
|
uses: actions/cache@v4
|
||||||
|
env:
|
||||||
|
cache-name: maven-repository
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.m2
|
||||||
|
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||||
|
- name: Build with Maven
|
||||||
|
working-directory: ${{ matrix.sample }}
|
||||||
|
run: mvn clean package --no-transfer-progress
|
@ -121,17 +121,5 @@ else
|
|||||||
(cd samples/client/petstore/scala-sttp-circe && mvn integration-test)
|
(cd samples/client/petstore/scala-sttp-circe && mvn integration-test)
|
||||||
(cd samples/client/petstore/scala-sttp4 && mvn integration-test)
|
(cd samples/client/petstore/scala-sttp4 && mvn integration-test)
|
||||||
(cd samples/client/petstore/clojure && mvn integration-test)
|
(cd samples/client/petstore/clojure && mvn integration-test)
|
||||||
(cd samples/client/petstore/java/jersey2-java8 && mvn integration-test)
|
|
||||||
(cd samples/openapi3/client/petstore/java/jersey2-java8 && mvn integration-test)
|
|
||||||
(cd samples/client/petstore/java/jersey3 && mvn integration-test)
|
|
||||||
(cd samples/client/petstore/java/jersey3-oneOf && mvn integration-test)
|
|
||||||
(cd samples/client/others/java/okhttp-gson-streaming && mvn integration-test)
|
|
||||||
(cd samples/client/petstore/java/okhttp-gson && mvn integration-test)
|
|
||||||
(cd samples/client/petstore/java/okhttp-gson-3.1 && mvn integration-test)
|
|
||||||
(cd samples/client/petstore/java/okhttp-gson-dynamicOperations && mvn integration-test)
|
|
||||||
(cd samples/client/petstore/java/resteasy && mvn integration-test)
|
|
||||||
(cd samples/client/petstore/java-micronaut-client && mvn integration-test)
|
|
||||||
(cd samples/client/petstore/java/apache-httpclient && mvn integration-test)
|
|
||||||
(cd samples/client/petstore/java/resttemplate-jakarta && mvn integration-test)
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
# OpenAPI Generator Ignore
|
# OpenAPI Generator Ignore
|
||||||
# These are "live" test files which should not be overwritten
|
# These are "live" test files which should not be overwritten
|
||||||
src/test/java/org/openapitools/client/JSONTest.java
|
src/test/java/org/openapitools/client/JSONTest.java
|
||||||
src/test/java/org/openapitools/client/JSONComposedSchemaTest.java
|
src/test/java/org/openapitools/client/JSONComposedSchemaTest.java
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user