Validator Lauf für neue Beispiele #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Validate Examples | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
CI_EXAMPLES_VALIDATION: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
# Install .NET runtime | |
- name: Setup .NET Core SDK | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 6.0.x | |
# Install Java runtime (only needed if you want to run the offical HL7 Java validator) | |
- name: Setup Java JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'microsoft' | |
java-version: '17' | |
- name: Identify changed files | |
id: files | |
run: | | |
echo "Changed .xml and .json files:" | |
git fetch origin main:main | |
git diff --name-only main | grep -E "\.xml$|\.json$" | tee changed-files.txt | |
if [ -s changed-files.txt ]; then | |
echo "::set-output name=changed::true" | |
else | |
echo "::set-output name=changed::false" | |
fi | |
- name: Copy changed files to a specific folder | |
run: | | |
mkdir temp_folder | |
cat changed_files.txt | xargs -I {} cp {} temp_folder/ | |
- name: Firely.Terminal (GitHub Actions) | |
uses: FirelyTeam/[email protected] | |
with: | |
PATH_TO_CONFORMANCE_RESOURCES: './temp_folder' | |
FIRELY_TERMINAL_VERSION: 3.1.0 | |
#PATH_TO_EXAMPLES: Examples | |
#PATH_TO_QUALITY_CONTROL_RULES: qc/custom | |
DOTNET_VALIDATION_ENABLED: false | |
JAVA_VALIDATION_ENABLED: true | |
OUTPUT_FORMAT: RAW | |
JAVA_VALIDATION_OPTIONS: -allow-example-urls true | |
JAVA_VALIDATOR_VERSION: 6.0.11 | |
SUSHI_ENABLED: false | |
- name: Cleanup | |
if: always() | |
run: rm -rf temp_folder |