Skip to content

Commit

Permalink
Test Java Play framework in Github action (#11598)
Browse files Browse the repository at this point in the history
* test play framework in github action

* trigger build

* add pom.xml

* revert readme
  • Loading branch information
wing328 authored Feb 13, 2022
1 parent 51a75c5 commit d481aa3
Show file tree
Hide file tree
Showing 5 changed files with 185 additions and 9 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/samples-java-play-framework.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Samples Java Play Framework

on:
push:
paths:
- 'samples/server/petstore/java-play-framework**'
pull_request:
paths:
- 'samples/server/petstore/java-play-framework**'
jobs:
build:
name: Build Java Play Framework
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# servers
- samples/server/petstore/java-play-framework
- samples/server/petstore/java-play-framework-api-package-override
- samples/server/petstore/java-play-framework-async
- samples/server/petstore/java-play-framework-controller-only
- samples/server/petstore/java-play-framework-fake-endpoints
- samples/server/petstore/java-play-framework-fake-endpoints-with-security
- samples/server/petstore/java-play-framework-no-bean-validation
- samples/server/petstore/java-play-framework-no-exception-handling
- samples/server/petstore/java-play-framework-no-interface
- samples/server/petstore/java-play-framework-no-nullable
- samples/server/petstore/java-play-framework-no-swagger-ui
- samples/server/petstore/java-play-framework-no-wrap-calls
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 11
- name: Cache maven dependencies
uses: actions/cache@v2.1.7
env:
cache-name: maven-repository
with:
path: |
~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Build
working-directory: ${{ matrix.sample }}
run: mvn clean package
9 changes: 0 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1171,15 +1171,6 @@
<module>samples/server/petstore/java-vertx-web</module>
<module>samples/server/petstore/java-inflector</module>
<module>samples/server/petstore/java-pkmst</module>
<module>samples/server/petstore/java-play-framework</module>
<module>samples/server/petstore/java-play-framework-no-wrap-calls</module>
<module>samples/server/petstore/java-play-framework-no-swagger-ui</module>
<module>samples/server/petstore/java-play-framework-no-interface</module>
<module>samples/server/petstore/java-play-framework-no-exception-handling</module>
<module>samples/server/petstore/java-play-framework-no-bean-validation</module>
<module>samples/server/petstore/java-play-framework-fake-endpoints</module>
<module>samples/server/petstore/java-play-framework-controller-only</module>
<module>samples/server/petstore/java-play-framework-api-package-override</module>
<module>samples/server/petstore/java-undertow</module>
<module>samples/server/petstore/jaxrs/jersey1</module>
<module>samples/server/petstore/jaxrs/jersey1-useTags</module>
Expand Down
46 changes: 46 additions & 0 deletions samples/server/petstore/java-play-framework-async/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.openapitools</groupId>
<artifactId>PlayServerTests-async</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>java-play-framework-async</name>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>Play Test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>sbt</executable>
<arguments>
<argument>test</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.openapitools</groupId>
<artifactId>PlayServerTests-with-security</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>java-play-framework-with-security Project</name>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>Play Test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>sbt</executable>
<arguments>
<argument>test</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
46 changes: 46 additions & 0 deletions samples/server/petstore/java-play-framework-no-nullable/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.openapitools</groupId>
<artifactId>PlayServerTests-no-nullable</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>java-play-framework-no-nullable Project</name>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>Play Test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>gradle</executable>
<arguments>
<argument>test</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit d481aa3

Please sign in to comment.