reusable-native-tests.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
  14. - uses: graalvm/setup-graalvm@2f25c0caae5b220866f732832d5e3e29ff493338 # v1.2.1.1
  15. with:
  16. version: "latest"
  17. java-version: "21"
  18. components: "native-image"
  19. - name: Running test
  20. env:
  21. DOCKER_COMPOSE_TEST: "true"
  22. run: |
  23. echo "GRAALVM_HOME: $GRAALVM_HOME"
  24. echo "JAVA_HOME: $JAVA_HOME"
  25. java --version
  26. native-image --version
  27. # Testcontainers does not work in some cases with GraalVM native images,
  28. # therefore we're starting a Kafka container manually for the tests
  29. docker compose -f .github/graal-native-docker-compose.yaml up -d
  30. # don't wait for startup - gradle compile takes long enough
  31. ./gradlew nativeTest
  32. docker compose -f .github/graal-native-docker-compose.yaml down # is this needed?