Skip to content

Commit aa1a9b8

Browse files
authored
Merge pull request #105 from hl7au/validate-master
Make validate step reusable
2 parents 16da25d + fb1df07 commit aa1a9b8

File tree

5 files changed

+29
-13
lines changed

5 files changed

+29
-13
lines changed

.github/report/action.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,6 @@ inputs:
66
runs:
77
using: 'composite'
88
steps:
9-
- name: Don't validate quarantine files
10-
shell: bash
11-
run: rm -v `cat ./quarantine`
12-
- shell: bash
13-
run: wget https://github.com/hapifhir/org.hl7.fhir.core/releases/latest/download/validator_cli.jar
14-
- shell: bash
15-
continue-on-error: true
16-
run: |
17-
java -jar validator_cli.jar generated/*.json \
18-
-version 4.0.1 -tx https://tx.dev.hl7.org.au/fhir \
19-
-ig hl7.fhir.au.core#1.0.0 -sct au \
20-
-level errors -jurisdiction au \
21-
-html-output g_validation.html -output g_validation.xml
229
- id: validation-result
2310
name: Archive validation result
2411
uses: actions/upload-artifact@v4

.github/validate/action.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Validate generated files
2+
runs:
3+
using: 'composite'
4+
steps:
5+
- name: Don't validate quarantine files
6+
shell: bash
7+
run: |
8+
mkdir ${{ runner.temp }}/quarantine &&\
9+
mv -v `cat ./quarantine` ${{ runner.temp }}/quarantine
10+
- shell: bash
11+
run: wget https://github.com/hapifhir/org.hl7.fhir.core/releases/latest/download/validator_cli.jar
12+
- name: Run validator
13+
shell: bash
14+
run: |
15+
java -jar validator_cli.jar generated/*.json \
16+
-version 4.0.1 -tx https://tx.dev.hl7.org.au/fhir \
17+
-ig hl7.fhir.au.core#1.0.0 -sct au \
18+
-level errors -jurisdiction au \
19+
-html-output g_validation.html -output g_validation.xml
20+
- name: Restore skipped files
21+
shell: bash
22+
run: mv -v ${{ runner.temp }}/quarantine/* ./generated

.github/workflows/convert.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ jobs:
3939
labels: automated-pr
4040
base: master
4141
branch: ${{ github.event.inputs.branch }}
42+
- name: Validate
43+
uses: ./.github/validate
44+
continue-on-error: true
4245
- name: Report
4346
uses: ./.github/report
4447
with:

.github/workflows/upload.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
uses: actions/checkout@v4
1414
- name: Install deps
1515
uses: ./.github/deps
16+
- name: Validate
17+
uses: ./.github/validate
1618
- shell: bash
1719
run: |
1820
cd /tmp &&\

.github/workflows/validate.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@ jobs:
2020
uses: stefanzweifel/git-auto-commit-action@v5
2121
with:
2222
commit_message: Update generated files
23+
- name: Validate
24+
uses: ./.github/validate
2325
- name: Report
2426
uses: ./.github/report

0 commit comments

Comments
 (0)