diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..9f4dd83 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,19 @@ +name: Java CI + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Build with Maven + run: mvn -B package --file pom.xml + - name: Run unit test with Surefire + run: mvn test diff --git a/README.md b/README.md index e203c85..e386798 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@

-# Create and deploy a Java - MicroProfile / Java EE Cloud application +# Create and deploy a Java Test - MicroProfile / Java EE Cloud application > We have applications available for [Node.js Express](https://github.com/IBM/node-express-app), [Go Gin](https://github.com/IBM/go-gin-app), [Python Flask](https://github.com/IBM/python-flask-app), [Python Django](https://github.com/IBM/python-django-app), [Java Spring](https://github.com/IBM/java-spring-app), [Java Liberty](https://github.com/IBM/java-liberty-app), and [Swift Kitura](https://github.com/IBM/swift-kitura-app). diff --git a/pom.xml b/pom.xml index a9c0167..660145e 100755 --- a/pom.xml +++ b/pom.xml @@ -114,9 +114,7 @@ test default-test - - **/it/** - + /src/test/it ${project.build.directory}/test-reports/unit diff --git a/src/main/java/application/HealthEndpoint.java b/src/main/java/application/HealthEndpoint.java index b197c92..6af7d66 100755 --- a/src/main/java/application/HealthEndpoint.java +++ b/src/main/java/application/HealthEndpoint.java @@ -18,7 +18,7 @@ public Response healthcheck() { return Response.status(503).entity("{\"status\":\"DOWN\"}").build(); } */ - return Response.ok("{\"status\":\"UP\"}").build(); + return Response.status(401).build(); } }