123456789101112131415161718192021222324252627282930313233343536373839 |
- name: Reusable - Native tests
- on:
- workflow_call:
- inputs:
- skip-native-tests:
- type: boolean
- required: false
- test-latest-deps:
- type: boolean
- required: false
- jobs:
- graalvm-native-tests:
- if: "!inputs.skip-native-tests"
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- - id: read-java
- run: echo "version=$(cat .java-version)" >> "$GITHUB_OUTPUT"
- - uses: graalvm/setup-graalvm@2f25c0caae5b220866f732832d5e3e29ff493338 # v1.2.1.1
- with:
- version: "latest"
- java-version: "${{ steps.read-java.outputs.version }}"
- components: "native-image"
- - name: Running test
- env:
- DOCKER_COMPOSE_TEST: "true"
- run: |
- echo "GRAALVM_HOME: $GRAALVM_HOME"
- echo "JAVA_HOME: $JAVA_HOME"
- java --version
- native-image --version
- # Testcontainers does not work in some cases with GraalVM native images,
- # therefore we're starting a Kafka container manually for the tests
- docker compose -f .github/graal-native-docker-compose.yaml up -d
- # don't wait for startup - gradle compile takes long enough
- ./gradlew ${{ inputs.test-latest-deps && '-PtestLatestDeps=true' || '' }} nativeTest
- docker compose -f .github/graal-native-docker-compose.yaml down # is this needed?
|