name: Reusable - Native tests on: workflow_call: inputs: skip-native-tests: type: boolean required: false jobs: graalvm-native-tests: if: "!inputs.skip-native-tests" runs-on: ubuntu-latest steps: - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 - 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 nativeTest docker compose -f .github/graal-native-docker-compose.yaml down # is this needed?