Skip to content

Commit 458d62f

Browse files
authored
Update masterfhirvalidation.yml
1 parent f308207 commit 458d62f

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/masterfhirvalidation.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,20 @@ jobs:
6767
run: cd validation-service-fhir-r4 && mvn clean package
6868

6969
- name: Run FHIR Validator
70-
run:
70+
run: |
7171
nohup java -jar validation-service-fhir-r4/target/fhir-validator.jar --terminology.url=https://ontology.nhs.uk/production1/fhir --terminology.authorization.tokenUrl=https://ontology.nhs.uk/authorisation/auth/realms/nhs-digital-terminology/protocol/openid-connect/token --terminology.authorization.clientId=${{ secrets.ONTO_CLIENT_ID }} --terminology.authorization.clientSecret=${{ secrets.ONTO_CLIENT_SECRET }} --aws.validationSupport=false --aws.queueEnabled=false &
72-
sleep 200
72+
# Wait for it to become ready, try 30 times, with 10 seconds between
73+
for i in {1..30}; do
74+
if curl -sSf http://localhost:8080/fhir/metadata > /dev/null; then
75+
echo "FHIR Validator is up!"
76+
exit 0
77+
fi
78+
echo "Waiting for FHIR Validator..."
79+
sleep 10
80+
done
81+
82+
echo "FHIR Validator failed to start in time"
83+
exit 1
7384
7485
- name: Run Test
7586
run: cd validation && npm test

0 commit comments

Comments
 (0)