-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yaml
85 lines (73 loc) · 2.7 KB
/
action.yaml
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# PDS: Git Action for LDD Generation
# =====================================
#
# This is a GitHub action that generates LDD for the current LDD Github Repo
---
name: '✅ PDS LDD Generation'
author: 'Jordan Padams <[email protected]>'
branding:
icon: 'archive'
color: 'green'
inputs:
data_path:
description: |
Absolute path to data to validate
required: true
pds4_im_version:
description: |
PDS4 Information Model Version. Defaults to the latest version. Use the semantic version, e.g. 1.14.0.0
required: false
default: 'latest'
pds4_development_release:
description: |
Flag to signify if this is a development release of the PDS4 Information Model
required: false
default: False
lddtool_development_release:
description: |
Flag to signify if the software should use the LDD Development release version
required: false
default: False
test_path:
description: |
Path to regression test data containing PDS4 labels.
required: false
logs_path:
description: |
Path to output software run logs
required: false
default: '/tmp/logs'
token:
description: |
Github token
required: true
enable_content_validation:
description: |
Flag to signify if validate should include content validation. By default, this is disabled.
required: false
default: False
runs:
using: 'composite'
steps:
- run: |
python -m pip install --upgrade pip setuptools==57.5.0 wheel
# Install LDD Manager Tools
python -m pip install pds.ldd-manager
# cleanup past logs
rm -fr ${{inputs.logs_path}}
shell: bash
- run: |
dev_release=""
if [ "${{inputs.lddtool_development_release}}" == "true" ]; then
dev_release="--use_lddtool_unstable --with_pds4_version ${{inputs.pds4_im_version}}"
fi
ldd-generate --ingest_ldd_src_dir $GITHUB_WORKSPACE/src --ldd_output_path "${{inputs.data_path}}" --with_pds4_version "${{inputs.pds4_im_version}}" --token ${{inputs.token}} --output_log_path ${{inputs.logs_path}} $dev_release
shell: bash
- run: |
echo "+++++ Run Validate to Check Schemas/Schematrons and Regression Tests +++++"
dev_release=""
if [ "${{inputs.pds4_development_release}}" == "true" ]; then
dev_release="--development_release"
fi
ldd-validate --datapath ${{inputs.data_path}}/ ${{inputs.test_path}}/ --skip_content_validation --with_pds4_version ${{inputs.pds4_im_version}} --schemas "${{inputs.data_path}}/*.xsd" --schematrons "${{inputs.data_path}}/*.sch" --token ${{inputs.token}} --output_log_path ${{inputs.logs_path}} $dev_release
shell: bash