From e8d19311997f924c3c7adfcff2322f4f0ab0d8fe Mon Sep 17 00:00:00 2001 From: dotasek Date: Tue, 9 May 2023 16:08:13 -0400 Subject: [PATCH 1/5] Create smoke-tests.yml --- .github/workflows/smoke-tests.yml | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/smoke-tests.yml diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml new file mode 100644 index 0000000..0467b36 --- /dev/null +++ b/.github/workflows/smoke-tests.yml @@ -0,0 +1,34 @@ +# This workflow will build the Java project with Maven and peform IntelliJ smoke tests +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Smoke Tests + +on: + push: + branches: + - '**' + paths-ignore: + - "charts/**" + pull_request: + branches: [ master ] + paths-ignore: + - "charts/**" + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout project + uses: actions/checkout@v2 + - name: Set up JDK 17 + uses: actions/setup-java@v1 + with: + java-version: 17 + - name: Build with Maven + run: mvn -B package --file pom.xml verify + - name: Download and install HTTP client + run: | + curl -f -L -o ijhttp.zip "https://jb.gg/ijhttp/latest" + unzip ijhttp.zip From d47d048a4f3bb31f1fead85eb0ae851f7dbee3a4 Mon Sep 17 00:00:00 2001 From: dotasek Date: Tue, 9 May 2023 16:25:55 -0400 Subject: [PATCH 2/5] Update smoke-tests.yml Don't do integration tests. Start server Run smoke tests Stop Server --- .github/workflows/smoke-tests.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 0467b36..f203856 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -15,7 +15,7 @@ on: - "charts/**" jobs: - build: + build_and_smoke_test: runs-on: ubuntu-latest @@ -27,8 +27,17 @@ jobs: with: java-version: 17 - name: Build with Maven - run: mvn -B package --file pom.xml verify + run: mvn -B package --file pom.xml - name: Download and install HTTP client run: | curl -f -L -o ijhttp.zip "https://jb.gg/ijhttp/latest" unzip ijhttp.zip + - name: Start server with jetty + run: | + mvn jetty:run & export JPA_PROCESS=$! + sleep 20 + - name: Execute smoke tests + run: ./ijhttp/ijhttp ./src/test/smoketest/plain_server.http --env-file ./src/test/smoketest/http-client.env.json --env default + - name: Stop server + run: kill $JPA_PROCESS + From f1765a314f197a9234966ffb72c27aa93e29a886 Mon Sep 17 00:00:00 2001 From: dotasek Date: Tue, 9 May 2023 16:26:31 -0400 Subject: [PATCH 3/5] Rename plain_server.rest to plain_server.http --- src/test/smoketest/{plain_server.rest => plain_server.http} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename src/test/smoketest/{plain_server.rest => plain_server.http} (99%) diff --git a/src/test/smoketest/plain_server.rest b/src/test/smoketest/plain_server.http similarity index 99% rename from src/test/smoketest/plain_server.rest rename to src/test/smoketest/plain_server.http index c5856ff..ff159a4 100644 --- a/src/test/smoketest/plain_server.rest +++ b/src/test/smoketest/plain_server.http @@ -220,4 +220,4 @@ POST http://{{host}}/fhir/Patient/{{batch_patient_id}}/$validate const resourceType = response.body.resourceType; client.assert(resourceType === "OperationOutcome", "Expected 'OperationOutcome' but received '" + resourceType + "'"); }); -%} \ No newline at end of file +%} From dbd6ff0eddf28bdc661b7f3fc499553b7279e5ba Mon Sep 17 00:00:00 2001 From: dotasek Date: Tue, 9 May 2023 16:34:55 -0400 Subject: [PATCH 4/5] Update smoke-tests.yml Skip maven tests Wait longer for server --- .github/workflows/smoke-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index f203856..a07e1c1 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -27,7 +27,7 @@ jobs: with: java-version: 17 - name: Build with Maven - run: mvn -B package --file pom.xml + run: mvn -B package --file pom.xml -Dmaven.test.skip=true - name: Download and install HTTP client run: | curl -f -L -o ijhttp.zip "https://jb.gg/ijhttp/latest" @@ -35,7 +35,7 @@ jobs: - name: Start server with jetty run: | mvn jetty:run & export JPA_PROCESS=$! - sleep 20 + sleep 45 - name: Execute smoke tests run: ./ijhttp/ijhttp ./src/test/smoketest/plain_server.http --env-file ./src/test/smoketest/http-client.env.json --env default - name: Stop server From ec64299976a9d1b3bc9c03ed88d68ce945f56bf1 Mon Sep 17 00:00:00 2001 From: dotasek Date: Tue, 9 May 2023 16:41:42 -0400 Subject: [PATCH 5/5] Update smoke-tests.yml Wait longer just in case Maybe don't kill the jetty server? --- .github/workflows/smoke-tests.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index a07e1c1..c0f90c3 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -35,9 +35,8 @@ jobs: - name: Start server with jetty run: | mvn jetty:run & export JPA_PROCESS=$! - sleep 45 + sleep 60 - name: Execute smoke tests run: ./ijhttp/ijhttp ./src/test/smoketest/plain_server.http --env-file ./src/test/smoketest/http-client.env.json --env default - - name: Stop server - run: kill $JPA_PROCESS +