From 06b3f99d2313f6fbc19d50591b3536752f4031cc Mon Sep 17 00:00:00 2001 From: Alexander Zautke Date: Fri, 4 Nov 2022 10:23:14 +0100 Subject: [PATCH] Remove 1 by 1 validation with .NET validator and update Java validator --- action.yml | 58 ++++-------------------------------------------------- 1 file changed, 4 insertions(+), 54 deletions(-) diff --git a/action.yml b/action.yml index 8ec6439..d2202cd 100644 --- a/action.yml +++ b/action.yml @@ -48,7 +48,7 @@ inputs: required: true JAVA_VALIDATOR_VERSION: description: 'Version of org.hl7.fhir.core library used for Java-based validation' - default: '5.6.65' + default: '5.6.75' required: true SUSHI_VERSION: description: 'Version of SUSHI used for compiling the FSH files' @@ -233,58 +233,8 @@ runs: # --------------------------------------------------------------------------------------------------- # # .NET VALIDATOR # # --------------------------------------------------------------------------------------------------- # - - # Add conformance resources for validation to the stack - - name: Add resources to the Firely Terminal stack - run: | - if $INPUT_DOTNET_VALIDATION_ENABLED; then - echo "Starting validation using .NET validator (Conformance resources) ..." - echo "Trying to validate conformance resources located at the following relative path(s): $INPUT_PATH_TO_CONFORMANCE_RESOURCES" - for p in $INPUT_PATH_TO_CONFORMANCE_RESOURCES; - do - echo Accessing "$p" and pushing resources to the stack... - if [ -d "$GITHUB_WORKSPACE/$p" ]; then - cd $GITHUB_WORKSPACE/$p - fhir push . - else - echo Cannot access "$p" as the path does not exist - fi - done - fi - shell: bash - env: - INPUT_PATH_TO_CONFORMANCE_RESOURCES: ${{ inputs.PATH_TO_CONFORMANCE_RESOURCES }} - INPUT_DOTNET_VALIDATION_ENABLED: ${{ inputs.DOTNET_VALIDATION_ENABLED }} - - # Validate all conformance resources on the stack - - name: Validate all conformance resources in scope of the repository - run: | - if $INPUT_DOTNET_VALIDATION_ENABLED; then - count=0 - while true; do - currentResource=$(fhir peek || true) - if [[ "$currentResource" == *"The stack is empty."* ]]; then - echo "Validation was executed for all conformance resources on the stack. Validated $count conformance resource(s)." - break - fi - ((count=count+1)) - echo "Validating $currentResource ..." - - result=$(fhir validate) - echo $result - if echo $result | grep -Eq "*"INVALID"*" && echo $INPUT_EXPECTED_FAILS | grep -w -q -v VALIDATION_CONFORMANCE_DOTNET; then - exit 1 - fi - - fhir pop > /dev/null - done - fi - shell: bash - env: - INPUT_DOTNET_VALIDATION_ENABLED: ${{ inputs.DOTNET_VALIDATION_ENABLED }} - INPUT_EXPECTED_FAILS: ${{ inputs.EXPECTED_FAILS }} - - # Run Quality Control checks + + # Run Quality Control checks incl. validation - name: Run Quality Control checks run: | if $INPUT_DOTNET_VALIDATION_ENABLED; then @@ -304,7 +254,7 @@ runs: env: INPUT_DOTNET_VALIDATION_ENABLED: ${{ inputs.DOTNET_VALIDATION_ENABLED }} - #Examples are currently not used as Firely Terminal can't validate against profiles on the stack right now + #Examples are currently not used as Firely Terminal can't differentiate between these two in QC checks. # --------------------------------------------------------------------------------------------------- # # JAVA Validator #