@@ -25,23 +25,79 @@ jobs:
2525 uses : actions/cache@v5
2626 with :
2727 path : ~/.cache/pip
28- key : ${{ runner.os }}-pip-${{ hashFiles('**/site /requirements.txt') }}
28+ key : ${{ runner.os }}-pip-${{ hashFiles('**/scripts /requirements.txt') }}
2929 restore-keys : |
3030 ${{ runner.os }}-pip-
3131
3232 - name : Install dependencies
3333 run : |
3434 python -m pip install --upgrade pip
35- pip install -r site /requirements.txt
35+ pip install -r scripts /requirements.txt
3636
3737 - name : Validate XLS document parsing
3838 run : |
3939 echo "Running XLS document validation..."
40- python site /xls_parser.py
40+ python scripts /xls_parser.py
4141
4242 - name : Report validation results
4343 if : always()
4444 run : |
4545 echo "XLS validation completed"
4646 echo "This pipeline validates that all XLS documents can be parsed correctly"
4747 echo "If this fails, it indicates issues with XLS document formatting or metadata"
48+
49+ validate-xls-template :
50+ runs-on : ubuntu-latest
51+ name : " [Beta CI Check] Validate XLS Template Compliance"
52+
53+ steps :
54+ - name : Checkout repository
55+ uses : actions/checkout@v6
56+ with :
57+ fetch-depth : 0 # Fetch full history for git diff
58+
59+ - name : Setup Python
60+ uses : actions/setup-python@v6
61+ with :
62+ python-version : " 3.11"
63+
64+ - name : Cache Python dependencies
65+ id : cache-deps
66+ uses : actions/cache@v5
67+ with :
68+ path : ~/.cache/pip
69+ key : ${{ runner.os }}-pip-${{ hashFiles('**/scripts/requirements.txt') }}
70+ restore-keys : |
71+ ${{ runner.os }}-pip-
72+
73+ - name : Install dependencies
74+ run : |
75+ python -m pip install --upgrade pip
76+ pip install -r scripts/requirements.txt
77+
78+ - name : Get changed XLS files
79+ id : changed-files
80+ uses : tj-actions/changed-files@v45
81+ with :
82+ files : |
83+ XLS-*/README.md
84+
85+ - name : Validate XLS template compliance
86+ if : steps.changed-files.outputs.all_changed_files != ''
87+ run : |
88+ echo "Running XLS template validation..."
89+ python scripts/validate_xls_template.py ${{ steps.changed-files.outputs.all_changed_files }}
90+
91+ - name : Report validation results
92+ if : always()
93+ run : |
94+ if [ "${{ steps.changed-files.outputs.all_changed_files }}" = "" ]; then
95+ echo "No XLS files were changed - skipping validation"
96+ else
97+ echo "XLS template validation completed"
98+ echo "Changed files: ${{ steps.changed-files.outputs.all_changed_files }}"
99+ echo ""
100+ echo "This validates that XLSes follow XLS_TEMPLATE.md"
101+ echo "And that Amendment specs follow AMENDMENT_TEMPLATE.md"
102+ echo "If this fails, check the error messages for missing sections or placeholders"
103+ fi
0 commit comments