-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (51 loc) · 1.99 KB
/
validate-fsh.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Validate FSH Files
on:
workflow_dispatch:
env:
IG: ${{ env.IG_KORTNAVN }}
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '16'
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Cache Node.js modules
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
${{ runner.os }}-
- 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 https://github.com/HL7Norway/resources/"
curl -L -o hl7.fhir.no.basis-2.2.0-snapshots.tgz https://raw.githubusercontent.com/HL7Norway/resources/main/snapshots/hl7.fhir.no.basis-2.2.0-snapshots.tgz
npm install hl7.fhir.no.basis-2.2.0-snapshots.tgz
echo "Create .fhir packages cache directory for no-basis"
mkdir -p $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/* $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 }}/input/fsh/
fsh-validator --all --log-path fsh-validator.log
- name: Upload output file
uses: actions/upload-artifact@v4
with:
name: fsh-validator.log
path: ${{ env.IG }}/input/fsh/fsh-validator.log