From d79f7312e75b0d1d9b8cb04e69d57b94c77bcf94 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 19 May 2026 11:08:22 +0800 Subject: [PATCH] update workflow to test jersey3 in jdk 17 workflow --- .../workflows/samples-java-client-jdk11.yaml | 3 -- .../workflows/samples-java-client-jdk17.yaml | 3 ++ .../samples-java-petsore-client-jdk17.yaml | 47 +++++++++++++++++++ .../jersey3-oneOf/.openapi-generator-ignore | 3 ++ 4 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/samples-java-petsore-client-jdk17.yaml diff --git a/.github/workflows/samples-java-client-jdk11.yaml b/.github/workflows/samples-java-client-jdk11.yaml index 8f0ee53a767e..41bd99733767 100644 --- a/.github/workflows/samples-java-client-jdk11.yaml +++ b/.github/workflows/samples-java-client-jdk11.yaml @@ -18,7 +18,6 @@ on: - samples/client/petstore/java/webclient-useSingleRequestParameter/** - samples/client/others/java/jersey2-oneOf-duplicates/** - 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/** @@ -41,7 +40,6 @@ on: - samples/client/petstore/java/webclient-useSingleRequestParameter/** - samples/client/others/java/jersey2-oneOf-duplicates/** - 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/** @@ -111,7 +109,6 @@ jobs: - samples/client/others/java/jersey2-oneOf-Mixed/ - samples/client/others/java/resttemplate-list-schema-validation/ - 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/ diff --git a/.github/workflows/samples-java-client-jdk17.yaml b/.github/workflows/samples-java-client-jdk17.yaml index 3ec4f403c8c5..4f6dd5ceda59 100644 --- a/.github/workflows/samples-java-client-jdk17.yaml +++ b/.github/workflows/samples-java-client-jdk17.yaml @@ -17,6 +17,7 @@ on: - samples/client/others/java/restclient-enum-in-multipart/** - samples/client/others/java/restclient-sealedInterface/** - samples/client/others/java/restclient-useAbstractionForFiles/** + - samples/client/petstore/java/jersey3-oneOf/** pull_request: paths: - samples/client/petstore/java/resttemplate-jakarta/** @@ -33,6 +34,7 @@ on: - samples/client/others/java/restclient-enum-in-multipart/** - samples/client/others/java/restclient-sealedInterface/** - samples/client/others/java/restclient-useAbstractionForFiles/** + - samples/client/petstore/java/jersey3-oneOf/** jobs: build: name: Build Java Client JDK17 @@ -64,6 +66,7 @@ jobs: - samples/client/others/java/restclient-enum-in-multipart - samples/client/others/java/restclient-sealedInterface - samples/client/others/java/restclient-useAbstractionForFiles + - samples/client/petstore/java/jersey3-oneOf steps: - uses: actions/checkout@v5 - uses: actions/setup-java@v5 diff --git a/.github/workflows/samples-java-petsore-client-jdk17.yaml b/.github/workflows/samples-java-petsore-client-jdk17.yaml new file mode 100644 index 000000000000..b2b680c7afaa --- /dev/null +++ b/.github/workflows/samples-java-petsore-client-jdk17.yaml @@ -0,0 +1,47 @@ +# run java client tests with petstore server +name: Samples Java Petsore Client JDK17 + +on: + push: + paths: + - samples/client/petstore/java/jersey3/** + pull_request: + paths: + - samples/client/petstore/java/jersey3/** +jobs: + build: + name: Build Java Client JDK17 + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + - samples/client/petstore/java/jersey3 + 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: 17 + - name: Cache maven dependencies + uses: actions/cache@v5 + 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 diff --git a/samples/client/petstore/java/jersey3-oneOf/.openapi-generator-ignore b/samples/client/petstore/java/jersey3-oneOf/.openapi-generator-ignore index 7484ee590a38..c5b04829c20a 100644 --- a/samples/client/petstore/java/jersey3-oneOf/.openapi-generator-ignore +++ b/samples/client/petstore/java/jersey3-oneOf/.openapi-generator-ignore @@ -21,3 +21,6 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md +# +# +#