reusable-native-tests.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. name: Reusable - Native tests
  2. on:
  3. workflow_call:
  4. inputs:
  5. skip-native-tests:
  6. type: boolean
  7. required: false
  8. jobs:
  9. graalvm-native-tests:
  10. if: "!inputs.skip-native-tests"
  11. runs-on: ubuntu-latest
  12. steps:
  13. - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
  14. - id: read-java
  15. run: echo "version=$(cat .java-version)" >> "$GITHUB_OUTPUT"
  16. - uses: graalvm/setup-graalvm@2f25c0caae5b220866f732832d5e3e29ff493338 # v1.2.1.1
  17. with:
  18. version: "latest"
  19. java-version: "${{ steps.read-java.outputs.version }}"
  20. components: "native-image"
  21. - name: Running test
  22. env:
  23. DOCKER_COMPOSE_TEST: "true"
  24. run: |
  25. echo "GRAALVM_HOME: $GRAALVM_HOME"
  26. echo "JAVA_HOME: $JAVA_HOME"
  27. java --version
  28. native-image --version
  29. # Testcontainers does not work in some cases with GraalVM native images,
  30. # therefore we're starting a Kafka container manually for the tests
  31. docker compose -f .github/graal-native-docker-compose.yaml up -d
  32. # don't wait for startup - gradle compile takes long enough
  33. ./gradlew nativeTest
  34. docker compose -f .github/graal-native-docker-compose.yaml down # is this needed?