Validate FSH Files #7
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 FSH Files | |
on: | |
workflow_dispatch: | |
env: | |
IG: mal | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install fsh-sushi | |
run: npm install -g fsh-sushi | |
- name: Install hl7.fhir.no.basis-2.2.0-snapshots in local cache | |
run: | | |
echo "NPM install fhir r4 core 4.0.1 from package registry" | |
npm --registry https://packages.simplifier.net install [email protected] | |
echo "NPM install fhir no-basis220 from local tgz" | |
npm install ${{ env.IG }}/snapshots/hl7.fhir.no.basis-2.2.0-snapshots.tgz | |
echo "Create .fhir packages cache directory for no-basis" | |
mkdir -p /github/home/.fhir/packages/hl7.fhir.no.basis#2.2.0/package | |
echo "Copy local no-basis snapshot to .fhir package cache directory" | |
cp -r ./node_modules/hl7.fhir.no.basis/* /github/home/.fhir/packages/hl7.fhir.no.basis#2.2.0/package | |
- name: Install fsh-validator | |
run: pip install -U git+https://github.com/glichtner/fsh-validator | |
- name: Run fsh-validator | |
run: | | |
cd ${{ env.IG }} | |
fsh-validator --all --verbose |