fix: Vulnerabilities and warnings #49
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GraalVM Integration Tests | |
on: | |
workflow_call: | |
pull_request: | |
branches: | |
- master | |
paths: | |
- 'integration/graalvm/**' | |
jobs: | |
graalvm-integration: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: integration/graalvm | |
strategy: | |
max-parallel: 1 | |
matrix: | |
server: ['ktor-graalvm-server', 'maven-graalvm-server', 'spring-graalvm-server'] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Setup GraalVM | |
uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: '17' | |
distribution: 'graalvm' | |
components: 'native-image' | |
native-image-job-reports: 'true' | |
- name: Set up Gradle cache | |
uses: gradle/gradle-build-action@v2 | |
- name: Build native image | |
timeout-minutes: 20 | |
id: build_server | |
run: | | |
./gradlew :${server}:buildGraalVmNativeImage | |
echo "NATIVE_IMAGE=$(echo "${server}/build/native/nativeCompile/${server}")" >> $GITHUB_OUTPUT | |
env: | |
server: ${{ matrix.server }} | |
- name: Start the native image | |
id: start_server | |
run: | | |
set -x | |
echo "starting server" | |
./${nativeImage} & | |
echo "SERVER_PID=$(echo $!)" >> $GITHUB_OUTPUT | |
env: | |
nativeImage: ${{ steps.build_server.outputs.NATIVE_IMAGE }} | |
- name: Integration Test | |
run: | | |
echo "sending a test query" | |
curl --request POST \ | |
--verbose \ | |
--header 'content-type: application/json' \ | |
--url http://localhost:8080/graphql \ | |
--data '{"query":"query($inputArg: InputOnlyInput){ inputTypeQuery(arg: $inputArg) }","variables":{"inputArg": { "id": 123 }}}' \ | |
> response.json | |
echo "received GraphQL response" | |
cat response.json | |
echo "verifying response" | |
jq -e '.data.inputTypeQuery == "InputOnly(id=123)"' response.json | |
- name: Stop server | |
if: ${{ always() }} | |
run: | | |
echo "shutting down server" | |
kill -9 ${{ steps.start_server.outputs.SERVER_PID }} |