Skip to content

Use --fail-with-body to fail the job if curl fails. #3

Use --fail-with-body to fail the job if curl fails.

Use --fail-with-body to fail the job if curl fails. #3

name: Test GraalPy Spring Pygal Charts
on:
push:
paths:
- 'graalpy/graalpy-spring-boot-pygal-charts/**'
- '.github/workflows/graalpy-spring-boot-pygal-charts.yml'
pull_request:
paths:
- 'graalpy/graalpy-spring-boot-pygal-charts/**'
- '.github/workflows/graalpy-spring-boot-pygal-charts.yml'
workflow_dispatch:
permissions:
contents: read
env:
NATIVE_IMAGE_OPTIONS: '-J-Xmx16g'
jobs:
run:
name: 'graalpy-spring-boot-pygal-charts'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
java-version: '23.0.0'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: 'maven'
native-image-job-reports: 'true'
- name: Build, test, and run 'graalpy-spring-boot-pygal-charts' using Maven
run: |
cd graalpy/graalpy-spring-boot-pygal-charts
./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/java
kill $sbpid
- name: Build and run native 'graalpy-spring-boot-pygal-charts' using Maven
run: |
cd graalpy/graalpy-spring-boot-pygal-charts
./mvnw --no-transfer-progress clean -DskipTests -Pnative native:compile
./target/demo &
sbpid="$!"
sleep 20
curl --fail-with-body --silent --dump-header - -o /dev/null http://localhost:8080/python
kill $sbpid