From cefe7fb56073d0e79d83826e7255b9ca1c99add7 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 12 Feb 2022 17:43:10 +0800 Subject: [PATCH] [Scala] test Scala clients, servers in GitHub workflow (#11592) * add samples/server/petstore/spring-boot-nullable-set to github workflow * add github workflow to test scala clients and servers * trigger build * remove module * trigger build * test with jdk8 * trigger build * test with jdk11 * clean up pom.xml * remove groovy from pom.xml * update samples --- .github/workflows/samples-scala.yaml | 44 ++++++++++++++++++++++++++++ pom.xml | 20 ------------- 2 files changed, 44 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/samples-scala.yaml diff --git a/.github/workflows/samples-scala.yaml b/.github/workflows/samples-scala.yaml new file mode 100644 index 00000000000..ca908a8e842 --- /dev/null +++ b/.github/workflows/samples-scala.yaml @@ -0,0 +1,44 @@ +name: Samples Scala + +on: + push: + paths: + - 'samples/client/petstore/scala**' + - 'samples/server/petstore/scala**' + pull_request: + paths: + - 'samples/client/petstore/scala**' + - 'samples/server/petstore/scala**' +jobs: + build: + name: Build Scala client, servers + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + # clients + - samples/client/petstore/scalaz + # servers + - samples/server/petstore/scala-lagom-server + - samples/server/petstore/scala-play-server + - samples/server/petstore/scala-akka-http-server + - samples/server/petstore/scalatra + - samples/server/petstore/scala-finch # cannot be tested with jdk11 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: 8 + - name: Cache maven dependencies + uses: actions/cache@v2.1.7 + 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 diff --git a/pom.xml b/pom.xml index d719aa806de..f3100a44e1a 100644 --- a/pom.xml +++ b/pom.xml @@ -1084,18 +1084,6 @@ samples/server/petstore/springboot-virtualan - - scalatra-server - - - env - java - - - - samples/server/petstore/scalatra - - java-inflector @@ -1228,11 +1216,6 @@ samples/server/petstore/jaxrs-cxf-cdi-default-value samples/server/petstore/jaxrs-cxf-non-spring-app samples/server/petstore/java-msf4j - samples/server/petstore/scala-lagom-server - samples/server/petstore/scala-play-server - samples/server/petstore/scala-akka-http-server - samples/server/petstore/scalatra - samples/server/petstore/scala-finch @@ -1318,12 +1301,9 @@ - samples/client/petstore/scala-akka samples/client/petstore/scala-sttp samples/client/petstore/scala-httpclient - samples/client/petstore/scalaz samples/client/petstore/clojure samples/client/petstore/java/feign samples/client/petstore/java/jersey1