Skip to content

Commit bca22e6

Browse files
added validation pipeline (#564)
1 parent 0b5a1fa commit bca22e6

File tree

8 files changed

+165
-149
lines changed

8 files changed

+165
-149
lines changed

.github/workflows/main.yml

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,56 +4,75 @@ name: CI (FHIR Validation)
44

55
# Controls when the action will run.
66
on:
7+
# Triggers the workflow on push or pull request events but only for the master branch
78
push:
89
paths:
910
- 'Resources/**'
11+
- '.github/workflows/**'
1012
branches-ignore:
1113
- 'main**'
12-
13-
# will run whenever a pull request is made to (target) any branch that starts with main
1414
pull_request:
1515
branches:
1616
- 'main**'
17+
workflow_call:
18+
secrets:
19+
SIMPLIFIER_USERNAME:
20+
required: true
21+
SIMPLIFIER_PASSWORD:
22+
required: true
23+
WORKFLOW_PERMISSION_GITHUB:
24+
required: true
1725

1826
# Allows you to run this workflow manually from the Actions tab
1927
workflow_dispatch:
2028

2129
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
2230
jobs:
2331

24-
# Validate all resources using Firely Terminal
32+
# Validate all resources using Firely Terminal
2533
CI_FHIR_VALIDATION:
2634
# The type of runner that the job will run on
2735
runs-on: ubuntu-latest
28-
36+
2937
# Steps represent a sequence of tasks that will be executed as part of the job
3038
steps:
31-
- name: Checkout code
39+
- name: Checkout code (PR)
40+
uses: actions/checkout@v4
41+
if: github.event_name == 'pull_request'
42+
with:
43+
ref: ${{ github.event.pull_request.head.ref }}
44+
45+
- name: Checkout code (Main)
3246
uses: actions/checkout@v4
33-
34-
# Java and .NET are already installed on ubuntu-latest
35-
47+
if: github.event_name != 'pull_request'
48+
49+
- name: Validate Resource Status
50+
uses: patrick-werner/fhir-resource-status-check@1.1.0
51+
with:
52+
folder: './Resources/fsh-generated/resources/'
53+
3654
- name: Firely.Terminal (GitHub Actions)
37-
uses: FirelyTeam/firely-terminal-pipeline@v0.4.3
55+
uses: FirelyTeam/firely-terminal-pipeline@v0.6.8
3856
with:
3957
PATH_TO_CONFORMANCE_RESOURCES: Resources/fsh-generated/resources/
40-
#PATH_TO_EXAMPLES: Examples
41-
PATH_TO_QUALITY_CONTROL_RULES: qc/custom
4258
DOTNET_VALIDATION_ENABLED: true
4359
JAVA_VALIDATION_ENABLED: true
44-
OUTPUT_FORMAT: RAW
45-
JAVA_VALIDATION_OPTIONS: -allow-example-urls true
60+
JAVA_VALIDATION_OPTIONS: -allow-example-urls true -output-style compact -html-output validation.html -show-message-ids -language de -jurisdiction de -display-issues-are-warnings -advisor-file validator/advisor.json -resolution-context file:Resources/fsh-generated/resources/
4661
SIMPLIFIER_USERNAME: ${{ secrets.SIMPLIFIER_USERNAME }}
4762
SIMPLIFIER_PASSWORD: ${{ secrets.SIMPLIFIER_PASSWORD }}
4863
SUSHI_ENABLED: true
4964
SUSHI_OPTIONS: Resources/
50-
SUSHI_VERSION: 3.12.0
51-
EXPECTED_FAILS: VALIDATION_CONFORMANCE_DOTNET VALIDATION_CONFORMANCE_JAVA VALIDATION_EXAMPLES_JAVA
65+
EXPECTED_FAILS: VALIDATION_CONFORMANCE_JAVA VALIDATION_CONFORMANCE_DOTNET
66+
67+
- name: Convert Validation Report
68+
uses: patrick-werner/fhir-html-validation-to-markdown@1.0.0
69+
with:
70+
input_file: 'validation.html'
5271

5372
- name: Add & Commit
5473
uses: EndBug/add-and-commit@v9
5574
with:
5675
committer_name: GitHub Actions Bot
5776
committer_email: ActionBot@github.com
58-
add: 'Resources/fsh-generated/resources/'
77+
add: Resources/fsh-generated/resources/
5978
message: auto-generated FHIR files by GitHub Actions (CI FSH to FHIR Validation)

0 commit comments

Comments
 (0)