forked from loafle/openapi-generator-original
66 lines
2.3 KiB
YAML
66 lines
2.3 KiB
YAML
# 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
|