-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (43 loc) · 1.44 KB
/
build.yml
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
49
50
---
name: Build
"on":
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
jdk: ['21']
steps:
- name: Check out code
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Login to Docker Hub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Start Test Database
run: |
docker compose up -d --wait --quiet-pull
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
with:
distribution: 'zulu'
java-version: ${{ matrix.jdk }}
java-package: jdk
cache: 'maven'
- name: Wait for database to initialise
run: |
echo "Waiting for HANA to start..."
timeout 600 bash -c "until docker logs hibernate-hdb-demo-hana-1 2>&1 | grep 'Ready at: ' > /dev/null 2>&1 ; do sleep 1 ; done"
echo "HANA is ready..."
- name: Build
run: |
mvn clean site install -B -Djdbc.url=jdbc:sap://localhost:39041 -Djdbc.user=SYSTEM -Djdbc.password=HXEHana1
- name: Stop test resources
if: always()
run: |
docker compose down > /dev/null 2>&1 || true