forked from XRPLF/XRPL-Standards
-
Notifications
You must be signed in to change notification settings - Fork 1
103 lines (87 loc) · 3.1 KB
/
validate-xls.yml
File metadata and controls
103 lines (87 loc) · 3.1 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Validate XLS Documents
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
jobs:
validate-xls:
runs-on: ubuntu-latest
name: Validate XLS Document Parsing
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Cache Python dependencies
id: cache-deps
uses: actions/cache@v5
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/scripts/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt
- name: Validate XLS document parsing
run: |
echo "Running XLS document validation..."
python scripts/xls_parser.py
- name: Report validation results
if: always()
run: |
echo "XLS validation completed"
echo "This pipeline validates that all XLS documents can be parsed correctly"
echo "If this fails, it indicates issues with XLS document formatting or metadata"
validate-xls-template:
runs-on: ubuntu-latest
name: "[Beta CI Check] Validate XLS Template Compliance"
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0 # Fetch full history for git diff
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Cache Python dependencies
id: cache-deps
uses: actions/cache@v5
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/scripts/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt
- name: Get changed XLS files
id: changed-files
uses: tj-actions/changed-files@v47
with:
files: |
XLS-*/README.md
- name: Validate XLS template compliance
if: steps.changed-files.outputs.all_changed_files != ''
run: |
echo "Running XLS template validation..."
python scripts/validate_xls_template.py ${{ steps.changed-files.outputs.all_changed_files }}
- name: Report validation results
if: always()
run: |
if [ "${{ steps.changed-files.outputs.all_changed_files }}" = "" ]; then
echo "No XLS files were changed - skipping validation"
else
echo "XLS template validation completed"
echo "Changed files: ${{ steps.changed-files.outputs.all_changed_files }}"
echo ""
echo "This validates that XLSes follow XLS_TEMPLATE.md"
echo "And that Amendment specs follow AMENDMENT_TEMPLATE.md"
echo "If this fails, check the error messages for missing sections or placeholders"
fi