Skip to content

Commit 58d99b1

Browse files
committed
minor changes
1 parent 6eb748c commit 58d99b1

2 files changed

Lines changed: 59 additions & 158 deletions

File tree

Lines changed: 56 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,68 @@
11
name: IOPS-FHIR-Validation-Terminology
22

3-
# Controls when the workflow will run
43
on:
5-
# Triggers the workflow on push or pull request events but only for the master branch
6-
# Allows you to run this workflow manually from the Actions tab
7-
84
workflow_call:
95
secrets:
106
ONTO_CLIENT_ID:
117
required: true
128
ONTO_CLIENT_SECRET:
139
required: true
14-
FAILONWARNING:
15-
required: false
1610

17-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1811
jobs:
19-
# This workflow contains a single job called "build"
2012
build:
21-
# The type of runner that the job will run on
2213
runs-on: ubuntu-latest
2314

24-
# Steps represent a sequence of tasks that will be executed as part of the job
2515
steps:
26-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
27-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v6
2817
with:
2918
submodules: true
30-
31-
- uses: actions/setup-java@v4
19+
20+
- uses: actions/setup-java@v5
3221
with:
33-
distribution: 'temurin'
22+
distribution: temurin
3423
java-version: '21'
35-
24+
3625
- name: Check out IOPS-Validation
37-
uses: actions/checkout@master
26+
uses: actions/checkout@v6
3827
with:
39-
repository: NHSDigital/IOPS-FHIR-Test-Scripts # orignally known as NHSDigital/IOPS-Validation
28+
repository: NHSDigital/IOPS-FHIR-Test-Scripts/FHIRValidationAction
4029
path: validation
4130

4231
- name: Check out validation-service-fhir-r4
43-
uses: actions/checkout@master
32+
uses: actions/checkout@v6
4433
with:
45-
repository: NHSDigital/IOPS-FHIR-Validation-Service
34+
repository: NHSDigital/FHIR-Validation
4635
ref: main
4736
path: validation-service-fhir-r4
48-
49-
- name: Cache Maven packages
50-
uses: actions/cache@v4
51-
with:
52-
path: ~/.m2
53-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
54-
restore-keys: ${{ runner.os }}-m2-
55-
56-
- name: Install npm
57-
run: cd validation && npm ci
58-
59-
- name: Configure FHIR Validator
60-
run: cd validation && npm start
37+
38+
- name: Debug XML file
39+
run: |
40+
FILE="valuesets/ValueSet-UKCore-ListCode.xml"
41+
echo "File size: $(wc -c < "$FILE")"
42+
echo "Last 5 lines:"
43+
tail -5 "$FILE"
44+
echo "Line endings: $(file "$FILE")"
45+
46+
- name: Build validation service
47+
run: |
48+
cd validation-service-fhir-r4
49+
mvn -B -ntp package
50+
51+
- name: Start Validation Service
52+
run: |
53+
cd validation-service-fhir-r4
54+
docker compose up -d
6155
env:
6256
CI: true
57+
ONTO_AUTH_URL: https://ontology.nhs.uk/authorisation/auth/realms/nhs-digital-terminology/protocol/openid-connect/token
58+
ONTO_SERVER_URL: https://ontology.nhs.uk/production1/fhir
6359
ONTO_CLIENT_ID: ${{ secrets.ONTO_CLIENT_ID }}
6460
ONTO_CLIENT_SECRET: ${{ secrets.ONTO_CLIENT_SECRET }}
65-
66-
- name: Build FHIR
67-
env:
68-
MAVEN_OPTS: -Xmx8G
69-
run: cd validation-service-fhir-r4 && mvn -DskipTests clean package
7061

71-
- name: Run FHIR Validator
62+
- name: Wait for FHIR Validator to be available
7263
run: |
73-
nohup java -Xms2G -Xmx8G -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 &
74-
# Wait for it to become ready, try 30 times, with 10 seconds between
7564
for i in {1..60}; do
76-
if curl -sSf http://localhost:9001/metadata > /dev/null || \
77-
curl -sSf http://localhost:9001/fhir/metadata > /dev/null; then
65+
if curl -sSf http://localhost:8080/fhir/metadata > /dev/null; then
7866
echo "FHIR Validator is up!"
7967
exit 0
8068
fi
@@ -84,8 +72,28 @@ jobs:
8472
8573
echo "FHIR Validator failed to start in time"
8674
exit 1
87-
88-
- name: Run Test
89-
run: cd validation && npm test
90-
env:
91-
FAILONWARNING: ${{ secrets.FAILONWARNING }}
75+
76+
- name: Debug directory
77+
run: |
78+
pwd
79+
ls -la
80+
81+
- name: Install FHIR packages
82+
run: python3 validation/scripts/configure-packages.py
83+
84+
- name: Upload FHIR assets + Examples
85+
run: python3 validation/scripts/upload-assets.py
86+
87+
- name: Debug - Check ValueSet uploaded
88+
run: |
89+
curl -s "http://localhost:8080/fhir/ValueSet?url=https://fhir.hl7.org.uk/ValueSet/UKCore-CareSettingType" | python3 -m json.tool | grep -E '"total"|"id"|"url"'
90+
91+
- name: Generate validation report
92+
if: always()
93+
run: python3 validation/scripts/generate-report.py
94+
95+
- name: Stop Validation Service
96+
if: always()
97+
run: |
98+
cd validation-service-fhir-r4
99+
docker compose down

.gitignore

Lines changed: 3 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,4 @@
1-
.idea
2-
node_modules
3-
package
4-
src/*.tgz
5-
src/hl7*
6-
src/nhs*
7-
.DS_Store# Logs
8-
logs
9-
*.log
10-
npm-debug.log*
11-
yarn-debug.log*
12-
yarn-error.log*
13-
lerna-debug.log*
14-
15-
# Diagnostic reports (https://nodejs.org/api/report.html)
16-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
17-
18-
# Runtime data
19-
pids
20-
*.pid
21-
*.seed
22-
*.pid.lock
23-
24-
# Directory for instrumented libs generated by jscoverage/JSCover
25-
lib-cov
26-
27-
# Coverage directory used by tools like istanbul
28-
coverage
29-
*.lcov
30-
31-
# nyc test coverage
32-
.nyc_output
33-
34-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
35-
.grunt
36-
37-
# Bower dependency directory (https://bower.io/)
38-
bower_components
39-
40-
# node-waf configuration
41-
.lock-wscript
42-
43-
# Compiled binary addons (https://nodejs.org/api/addons.html)
44-
build/Release
45-
46-
# Dependency directories
47-
node_modules/
48-
jspm_packages/
49-
50-
# TypeScript v1 declaration files
51-
typings/
52-
53-
# TypeScript cache
54-
*.tsbuildinfo
55-
56-
# Optional npm cache directory
57-
.npm
58-
59-
# Optional eslint cache
60-
.eslintcache
61-
62-
# Microbundle cache
63-
.rpt2_cache/
64-
.rts2_cache_cjs/
65-
.rts2_cache_es/
66-
.rts2_cache_umd/
67-
68-
# Optional REPL history
69-
.node_repl_history
70-
71-
# Output of 'npm pack'
72-
*.tgz
73-
74-
# Yarn Integrity file
75-
.yarn-integrity
76-
77-
# dotenv environment variables file
781
.env
79-
.env.test
80-
81-
# parcel-bundler cache (https://parceljs.org/)
82-
.cache
83-
84-
# Next.js build output
85-
.next
86-
87-
# Nuxt.js build / generate output
88-
.nuxt
89-
dist
90-
91-
# Gatsby files
92-
.cache/
93-
# Comment in the public line in if your project uses Gatsby and *not* Next.js
94-
# https://nextjs.org/blog/next-9-1#public-directory-support
95-
# public
96-
97-
# vuepress build output
98-
.vuepress/dist
99-
100-
# Serverless directories
101-
.serverless/
102-
103-
# FuseBox cache
104-
.fusebox/
105-
106-
# DynamoDB Local files
107-
.dynamodb/
108-
109-
# TernJS port file
110-
.tern-port
111-
/validator_cli.jar
2+
.venv
3+
**/__pycache__/
4+
**/operation_outcomes.json

0 commit comments

Comments
 (0)