mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-10-15 17:03:43 +00:00
Refactor Scala client, server Github workflow for testing (#22005)
* refactor scala client server workflow for testing * fix * migrate circleci scala tests * add service, update host table * java 8 * add distribution * java 17 * 2.13.x * update * clean up circleci config
This commit is contained in:
parent
71a6901d1e
commit
24d7c3e904
70
.github/workflows/samples-scala-client.yaml
vendored
Normal file
70
.github/workflows/samples-scala-client.yaml
vendored
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
name: Samples Scala/sbt client
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- samples/client/petstore/scalaz/**
|
||||||
|
- samples/client/petstore/scala-pekko/**
|
||||||
|
- samples/client/petstore/scala-http4s/**
|
||||||
|
- samples/client/petstore/scala-sttp4-jsoniter/**
|
||||||
|
- samples/client/petstore/scala-akka/**
|
||||||
|
- samples/client/petstore/scala-sttp/**
|
||||||
|
- samples/client/petstore/scala-sttp-circe/**
|
||||||
|
- samples/client/petstore/scala-sttp4/**
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- samples/client/petstore/scalaz/**
|
||||||
|
- samples/client/petstore/scala-pekko/**
|
||||||
|
- samples/client/petstore/scala-http4s/**
|
||||||
|
- samples/client/petstore/scala-sttp4-jsoniter/**
|
||||||
|
- samples/client/petstore/scala-akka/**
|
||||||
|
- samples/client/petstore/scala-sttp/**
|
||||||
|
- samples/client/petstore/scala-sttp-circe/**
|
||||||
|
- samples/client/petstore/scala-sttp4/**
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build sbt/Scala
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
sample:
|
||||||
|
# clients
|
||||||
|
- samples/client/petstore/scalaz
|
||||||
|
- samples/client/petstore/scala-pekko
|
||||||
|
- samples/client/petstore/scala-http4s
|
||||||
|
- samples/client/petstore/scala-sttp4-jsoniter
|
||||||
|
- samples/client/petstore/scala-akka
|
||||||
|
- samples/client/petstore/scala-sttp
|
||||||
|
- samples/client/petstore/scala-sttp-circe
|
||||||
|
- samples/client/petstore/scala-sttp4
|
||||||
|
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: Setup sbt launcher
|
||||||
|
uses: sbt/setup-sbt@v1
|
||||||
|
- name: Cache maven dependencies
|
||||||
|
uses: actions/cache@v4
|
||||||
|
env:
|
||||||
|
cache-name: maven-repository
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.ivy2
|
||||||
|
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/build.sbt') }}
|
||||||
|
- name: Build and test
|
||||||
|
working-directory: ${{ matrix.sample }}
|
||||||
|
run: sbt -v test
|
@ -1,29 +1,20 @@
|
|||||||
name: Samples Scala/sbt
|
name: Samples Scala/sbt server
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- 'samples/client/petstore/scala**'
|
|
||||||
- 'samples/server/petstore/scala**'
|
- 'samples/server/petstore/scala**'
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- 'samples/client/petstore/scala**'
|
|
||||||
- 'samples/server/petstore/scala**'
|
- 'samples/server/petstore/scala**'
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build sbt/Scala client, servers
|
name: Build sbt/Scala
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
sample:
|
sample:
|
||||||
# clients
|
|
||||||
- samples/client/petstore/scalaz
|
|
||||||
- samples/client/petstore/scala-pekko
|
|
||||||
- samples/client/petstore/scala-http4s
|
|
||||||
- samples/client/petstore/scala-sttp4-jsoniter
|
|
||||||
#- samples/client/petstore/scala-sttp
|
|
||||||
#- samples/client/petstore/scala-sttp-circe
|
|
||||||
# servers
|
# servers
|
||||||
- samples/server/petstore/scala-play-server
|
- samples/server/petstore/scala-play-server
|
||||||
- samples/server/petstore/scala-akka-http-server
|
- samples/server/petstore/scala-akka-http-server
|
@ -116,9 +116,4 @@ else
|
|||||||
echo "Running node $NODE_INDEX ..."
|
echo "Running node $NODE_INDEX ..."
|
||||||
java -version
|
java -version
|
||||||
|
|
||||||
(cd samples/client/petstore/scala-akka && mvn integration-test)
|
|
||||||
(cd samples/client/petstore/scala-sttp && mvn integration-test)
|
|
||||||
(cd samples/client/petstore/scala-sttp-circe && mvn integration-test)
|
|
||||||
(cd samples/client/petstore/scala-sttp4 && mvn integration-test)
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
@ -22,3 +22,5 @@
|
|||||||
# Then explicitly reverse the ignore rule for a single file:
|
# Then explicitly reverse the ignore rule for a single file:
|
||||||
#!docs/README.md
|
#!docs/README.md
|
||||||
pom.xml
|
pom.xml
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,3 +21,6 @@
|
|||||||
#docs/*.md
|
#docs/*.md
|
||||||
# Then explicitly reverse the ignore rule for a single file:
|
# Then explicitly reverse the ignore rule for a single file:
|
||||||
#!docs/README.md
|
#!docs/README.md
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user