From d909fa276c06e14b82ab60af07dd7231b3f018e4 Mon Sep 17 00:00:00 2001 From: Tim Felgentreff Date: Mon, 4 Nov 2024 17:20:10 +0100 Subject: [PATCH] Update workflows to test gradle examples for graalpy --- .../graalpy-freeze-dependencies-guide.yml | 11 +++++++++- .github/workflows/graalpy-micronaut-guide.yml | 22 +++++++++++++++++++ .../workflows/graalpy-spring-boot-guide.yml | 22 +++++++++++++++++++ graalpy/graalpy-spring-boot-guide/README.md | 2 +- 4 files changed, 55 insertions(+), 2 deletions(-) diff --git a/.github/workflows/graalpy-freeze-dependencies-guide.yml b/.github/workflows/graalpy-freeze-dependencies-guide.yml index 5206ef3..6531f86 100644 --- a/.github/workflows/graalpy-freeze-dependencies-guide.yml +++ b/.github/workflows/graalpy-freeze-dependencies-guide.yml @@ -28,6 +28,15 @@ jobs: shell: bash run: | cd graalpy/graalpy-freeze-dependencies-guide + git clean -fdx ./mvnw --no-transfer-progress compile ./mvnw --no-transfer-progress exec:java -Dexec.mainClass=org.example.App | tee /tmp/output - grep darent /tmp/output \ No newline at end of file + grep darent /tmp/output + - name: Build, test, and run 'graalpy-freeze-dependencies-guide' using Gradle + shell: bash + run: | + cd graalpy/graalpy-freeze-dependencies-guide + git clean -fdx + ./gradlew build + ./gradlew run | tee /tmp/output + grep darent /tmp/output diff --git a/.github/workflows/graalpy-micronaut-guide.yml b/.github/workflows/graalpy-micronaut-guide.yml index 63bf2c3..97a2aa6 100644 --- a/.github/workflows/graalpy-micronaut-guide.yml +++ b/.github/workflows/graalpy-micronaut-guide.yml @@ -30,18 +30,40 @@ jobs: - name: Build, test, and run 'graalpy-micronaut-guide' using Maven run: | cd graalpy/graalpy-micronaut-guide + git clean -fdx ./mvnw --no-transfer-progress clean test -Dmicronaut.http.client.read-timeout=1m ./mvnw --no-transfer-progress mn:run & mnpid="$!" sleep 30 curl --fail-with-body --silent --dump-header - -o /dev/null http://localhost:8080/ kill $mnpid + - name: Build, test, and run 'graalpy-micronaut-guide' using Gradle + run: | + cd graalpy/graalpy-micronaut-guide + git clean -fdx + ./gradlew test -Dmicronaut.http.client.read-timeout=1m + ./gradlew run & + mnpid="$!" + sleep 30 + curl --fail-with-body --silent --dump-header - -o /dev/null http://localhost:8080/ + kill $mnpid - name: Build and run native 'graalpy-micronaut-guide' using Maven run: | cd graalpy/graalpy-micronaut-guide + git clean -fdx ./mvnw --no-transfer-progress clean package -DskipTests -Dpackaging=native-image ./target/graalpy-micronaut & mnpid="$!" sleep 20 curl --fail-with-body --silent --dump-header - -o /dev/null http://localhost:8080/ kill $mnpid + - name: Build and run native 'graalpy-micronaut-guide' using Gradle + run: | + cd graalpy/graalpy-micronaut-guide + git clean -fdx + ./gradlew nativeCompile + ./build/native/nativeCompile/demo & + mnpid="$!" + sleep 20 + curl --fail-with-body --silent --dump-header - -o /dev/null http://localhost:8080/ + kill $mnpid diff --git a/.github/workflows/graalpy-spring-boot-guide.yml b/.github/workflows/graalpy-spring-boot-guide.yml index 80e53ab..31e2bb4 100644 --- a/.github/workflows/graalpy-spring-boot-guide.yml +++ b/.github/workflows/graalpy-spring-boot-guide.yml @@ -30,18 +30,40 @@ jobs: - name: Build, test, and run 'graalpy-spring-boot-guide' using Maven run: | cd graalpy/graalpy-spring-boot-guide + git clean -fdx ./mvnw --no-transfer-progress clean test -Dspring.mvc.async.request-timeout=60000 ./mvnw --no-transfer-progress spring-boot:run & sbpid="$!" sleep 30 curl --fail-with-body --silent --dump-header - -o /dev/null http://localhost:8080/ kill $sbpid + - name: Build, test, and run 'graalpy-spring-boot-guide' using Gradle + run: | + cd graalpy/graalpy-spring-boot-guide + git clean -fdx + ./gradlew test -Dspring.mvc.async.request-timeout=60000 + ./gradlew bootRun & + sbpid="$!" + sleep 30 + curl --fail-with-body --silent --dump-header - -o /dev/null http://localhost:8080/ + kill $sbpid - name: Build and run native 'graalpy-spring-boot-guide' using Maven run: | cd graalpy/graalpy-spring-boot-guide + git clean -fdx ./mvnw --no-transfer-progress clean -DskipTests -Pnative native:compile ./target/graalpy-springboot & sbpid="$!" sleep 20 curl --fail-with-body --silent --dump-header - -o /dev/null http://localhost:8080/ kill $sbpid + - name: Build and run native 'graalpy-spring-boot-guide' using Gradle + run: | + cd graalpy/graalpy-spring-boot-guide + git clean -fdx + ./gradlew nativeCompile + ./build/native/nativeCompile/demo & + sbpid="$!" + sleep 20 + curl --fail-with-body --silent --dump-header - -o /dev/null http://localhost:8080/ + kill $sbpid diff --git a/graalpy/graalpy-spring-boot-guide/README.md b/graalpy/graalpy-spring-boot-guide/README.md index c277c6f..63b0855 100644 --- a/graalpy/graalpy-spring-boot-guide/README.md +++ b/graalpy/graalpy-spring-boot-guide/README.md @@ -464,7 +464,7 @@ To run the application: or ```bash -./gradlew run +./gradlew bootRun ``` This will start the application on port 8080.