@@ -4,56 +4,75 @@ name: CI (FHIR Validation)
4
4
5
5
# Controls when the action will run.
6
6
on :
7
+ # Triggers the workflow on push or pull request events but only for the master branch
7
8
push :
8
9
paths :
9
10
- ' Resources/**'
11
+ - ' .github/workflows/**'
10
12
branches-ignore :
11
13
- ' main**'
12
-
13
- # will run whenever a pull request is made to (target) any branch that starts with main
14
14
pull_request :
15
15
branches :
16
16
- ' 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
17
25
18
26
# Allows you to run this workflow manually from the Actions tab
19
27
workflow_dispatch :
20
28
21
29
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
22
30
jobs :
23
31
24
- # Validate all resources using Firely Terminal
32
+ # Validate all resources using Firely Terminal
25
33
CI_FHIR_VALIDATION :
26
34
# The type of runner that the job will run on
27
35
runs-on : ubuntu-latest
28
-
36
+
29
37
# Steps represent a sequence of tasks that will be executed as part of the job
30
38
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)
32
46
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
+
36
54
- name : Firely.Terminal (GitHub Actions)
37
- uses : FirelyTeam/firely-terminal-pipeline@v0.4.3
55
+ uses : FirelyTeam/firely-terminal-pipeline@v0.6.8
38
56
with :
39
57
PATH_TO_CONFORMANCE_RESOURCES : Resources/fsh-generated/resources/
40
- # PATH_TO_EXAMPLES: Examples
41
- PATH_TO_QUALITY_CONTROL_RULES : qc/custom
42
58
DOTNET_VALIDATION_ENABLED : true
43
59
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/
46
61
SIMPLIFIER_USERNAME : ${{ secrets.SIMPLIFIER_USERNAME }}
47
62
SIMPLIFIER_PASSWORD : ${{ secrets.SIMPLIFIER_PASSWORD }}
48
63
SUSHI_ENABLED : true
49
64
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'
52
71
53
72
- name : Add & Commit
54
73
uses : EndBug/add-and-commit@v9
55
74
with :
56
75
committer_name : GitHub Actions Bot
57
76
committer_email : ActionBot@github.com
58
- add : ' Resources/fsh-generated/resources/'
77
+ add : Resources/fsh-generated/resources/
59
78
message : auto-generated FHIR files by GitHub Actions (CI FSH to FHIR Validation)
0 commit comments