Skip to content

test

test #69

Workflow file for this run

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]
- 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: ls -la && ls -la ./scripts
- 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