Skip to content

Workflow: check docker startup more transparently #225

Workflow: check docker startup more transparently

Workflow: check docker startup more transparently #225

name: Build and Test Bootable JAR
on:
push:
pull_request:
branches: [ main, development ]
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
java: [17, 21]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Grant execute permission for Gradle wrapper (Unix)
if: runner.os != 'Windows'
run: chmod +x gradlew
- name: Build bootable JAR (skip tests)
run: ./gradlew bootJar -x test
- name: Run JAR with auto-input
shell: bash
run: |
echo -e "\n\n\n\n\n\nok\nyes" | java -jar build/libs/wap-server.jar &
echo $! > server.pid
sleep 20 # Give the server time to start
- name: hurl install
uses: gacts/[email protected]
with: {disable-cache: true} # hurl installation sometimes fails on cache restore, trying to disable it as a workaround https://github.com/gacts/install-hurl/issues/93
- name: hurl CRUD tests (windows)
if: runner.os == 'Windows'
shell: bash
run: |
for file in ./integration_tests/CRUD/*.hurl; do
hurl --variable host=http://localhost:8080 --test "$file" --verbose --error-format=long --continue-on-error --report-html hurlreports
done
- name: hurl tests (other)
if: runner.os != 'Windows'
run: hurl --variable host=http://localhost:8080 --test ./integration_tests/CRUD/*.hurl --verbose --error-format=long --continue-on-error --report-html hurlreports
- name: hurl performance tests
run: hurl --variable host=http://localhost:8080 --test ./integration_tests/performance/create_anno.hurl --jobs 1 --repeat 1000 --verbose --error-format=long --report-html hurlreports
- name: Upload generated libs as job artifact
uses: actions/upload-artifact@v4
with:
name: jar_jdk${{ matrix.java }}_${{ matrix.os }}
path: ./build/libs/