-
Notifications
You must be signed in to change notification settings - Fork 100
52 lines (40 loc) · 1.33 KB
/
test.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
name: Test
on: push
jobs:
run-tests:
name: Run Tests
runs-on: ubuntu-latest
container:
image: docker:latest
options: --privileged
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up Docker Compose and curl
run: apk add --no-cache docker-compose curl
- name: Build
run: docker compose up -d
- name: Wait for application to be ready
run: |
max_attempts=12
attempt=0
echo "Waiting for the application to be ready..."
while ! docker logs "node-fhir-server-mongo-fhir-1" 2>&1 | grep "Server is up and running!"; do
# Increment the attempt counter
attempt=$((attempt + 1))
if [ "$attempt" -ge "$max_attempts" ]; then
break
fi
echo "Waiting..."
sleep 5
done
echo "fhir container logs:"
docker logs "node-fhir-server-mongo-fhir-1"
echo "fhir container logs end"
- name: Test new patient request
run: sh ./scripts/curlRequests/new_patient_test.sh
- name: Test get patient request
run: sh ./scripts/curlRequests/patient_get_test.sh
- name: Test get non-existing patient request
run: sh ./scripts/curlRequests/patient_get_fail_test.sh