-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (39 loc) · 1.29 KB
/
bootjar_testing.yml
File metadata and controls
48 lines (39 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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]
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: Find JAR file
id: find-jar
run: |
echo "JAR_PATH=$(find build/libs -name '*.jar' | head -n 1)" >> $GITHUB_ENV
- name: Run JAR with auto-input
shell: bash
run: |
echo -e "\n\n\n\n\n\nok\nyes" | java -jar "$JAR_PATH" &
echo $! > server.pid
sleep 20 # Give the server time to start
- name: hurl install
uses: gacts/install-hurl@v1
- name: hurl tests
run: hurl --variable host=http://localhost:8080 --test integration_tests/*.hurl --verbose --error-format=long --continue-on-error