Merge pull request #58 #84
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test GraalPy Spring Boot Guide | |
| on: | |
| push: | |
| paths: | |
| - 'graalpy/graalpy-spring-boot-guide/**' | |
| - '.github/workflows/graalpy-spring-boot-guide.yml' | |
| pull_request: | |
| paths: | |
| - 'graalpy/graalpy-spring-boot-guide/**' | |
| - '.github/workflows/graalpy-spring-boot-guide.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| NATIVE_IMAGE_OPTIONS: '-J-Xmx16g' | |
| jobs: | |
| maven: | |
| name: 'graalpy-spring-boot-guide on Maven' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: graalvm/setup-graalvm@v1 | |
| with: | |
| java-version: '21.0.8' | |
| distribution: 'graalvm' | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| cache: 'maven' | |
| - name: Build, test, and run 'graalpy-spring-boot-guide' | |
| 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 | |
| - uses: graalvm/setup-graalvm@v1 | |
| with: | |
| java-version: '25.0.1' | |
| distribution: 'graalvm' | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| cache: 'maven' | |
| set-java-home: false # keep using previous JAVA_HOME, but use different GRAALVM_JAVA_HOME for generating native image | |
| native-image-job-reports: 'true' | |
| - name: Build and run native 'graalpy-spring-boot-guide' | |
| 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 | |
| gradle: | |
| name: 'graalpy-spring-boot-guide on Gradle' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: graalvm/setup-graalvm@v1 | |
| with: | |
| java-version: '21.0.8' | |
| distribution: 'graalvm' | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| cache: 'gradle' | |
| - name: Build, test, and run 'graalpy-spring-boot-guide' | |
| 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 | |
| - uses: graalvm/setup-graalvm@v1 | |
| with: | |
| java-version: '25.0.1' | |
| distribution: 'graalvm' | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| cache: 'gradle' | |
| set-java-home: false # keep using previous JAVA_HOME, but use different GRAALVM_HOME for generating native image | |
| native-image-job-reports: 'true' | |
| - name: Build and run native 'graalpy-mispring-boot-guide' | |
| 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 |