-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (54 loc) · 1.57 KB
/
ci.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
51
52
53
54
55
56
name: CI
on:
push:
branches:
- main
paths-ignore:
- "*.md"
pull_request:
branches:
- main
paths-ignore:
- "*.md"
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18, 20, 22]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Start SAP HANA Express container
run: |
docker run -d --name hana \
-p 39013:39013 \
-p 39017:39017 \
-p 39041-39045:39041-39045 \
-p 1128-1129:1128-1129 \
-p 59013-59014:59013-59014 \
saplabs/hanaexpress:latest \
--master-password Password1! \
--agree-to-sap-license \
- name: Wait for SAP HANA startup to complete
run: |
echo "Waiting for SAP HANA Express to be ready (looking for 'Startup finished!')..."
while ! docker logs hana 2>&1 | grep -q "Startup finished!"; do
echo "Still waiting for SAP HANA to finish starting up..."
echo "Current logs from SAP HANA container:"
docker logs --tail 200 hana 2>&1
sleep 5
done
echo "SAP HANA Express startup completed!"
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Run db migrations
run: npm run migrate
- name: Run tests
run: npm run ci