|
39 | 39 |
|
40 | 40 | - name: Validate A2ML manifests |
41 | 41 | if: steps.detect.outputs.count > 0 |
42 | | - uses: hyperpolymath/a2ml-validate-action@59145c7d1039fa3059b3ecacdb50ee23d7505898 # main |
| 42 | + uses: hyperpolymath/a2ml-ecosystem/validate-action@aa4b836bd969df2bc58128cb8e3d20bbc88d5e79 # main |
43 | 43 | with: |
44 | 44 | path: '.' |
45 | 45 | strict: 'false' |
|
87 | 87 |
|
88 | 88 | - name: Validate K9 contracts |
89 | 89 | if: steps.detect.outputs.k9_count > 0 |
90 | | - uses: hyperpolymath/k9-validate-action@2d96f43c538964b097d159ed3a56ba5b5ceca227 # main |
| 90 | + uses: hyperpolymath/k9-ecosystem/validate-action@89f3c2702f4f650a92aa7411502f38da06abd562 # main |
91 | 91 | with: |
92 | 92 | path: '.' |
93 | 93 | strict: 'false' |
@@ -259,26 +259,26 @@ jobs: |
259 | 259 |
|
260 | 260 | # Validate TOML structure using Python 3.11+ tomllib |
261 | 261 | python3 -c " |
262 | | -import tomllib, sys |
263 | | -with open('eclexiaiser.toml', 'rb') as f: |
264 | | - data = tomllib.load(f) |
265 | | -project = data.get('project', {}) |
266 | | -if not project.get('name', '').strip(): |
267 | | - print('ERROR: project.name is required', file=sys.stderr) |
268 | | - sys.exit(1) |
269 | | -functions = data.get('functions', []) |
270 | | -if not functions: |
271 | | - print('ERROR: at least one [[functions]] entry is required', file=sys.stderr) |
272 | | - sys.exit(1) |
273 | | -for fn in functions: |
274 | | - if not fn.get('name', '').strip(): |
275 | | - print('ERROR: function name cannot be empty', file=sys.stderr) |
276 | | - sys.exit(1) |
277 | | - if not fn.get('source', '').strip(): |
278 | | - print(f'ERROR: function {fn[\"name\"]} has no source path', file=sys.stderr) |
279 | | - sys.exit(1) |
280 | | -print(f'Valid: {project[\"name\"]} ({len(functions)} function(s))') |
281 | | -" || { |
| 262 | + import tomllib, sys |
| 263 | + with open('eclexiaiser.toml', 'rb') as f: |
| 264 | + data = tomllib.load(f) |
| 265 | + project = data.get('project', {}) |
| 266 | + if not project.get('name', '').strip(): |
| 267 | + print('ERROR: project.name is required', file=sys.stderr) |
| 268 | + sys.exit(1) |
| 269 | + functions = data.get('functions', []) |
| 270 | + if not functions: |
| 271 | + print('ERROR: at least one [[functions]] entry is required', file=sys.stderr) |
| 272 | + sys.exit(1) |
| 273 | + for fn in functions: |
| 274 | + if not fn.get('name', '').strip(): |
| 275 | + print('ERROR: function name cannot be empty', file=sys.stderr) |
| 276 | + sys.exit(1) |
| 277 | + if not fn.get('source', '').strip(): |
| 278 | + print(f'ERROR: function {fn[\"name\"]} has no source path', file=sys.stderr) |
| 279 | + sys.exit(1) |
| 280 | + print(f'Valid: {project[\"name\"]} ({len(functions)} function(s))') |
| 281 | + " || { |
282 | 282 | echo "::error file=eclexiaiser.toml::Invalid eclexiaiser.toml — see step output for details" |
283 | 283 | exit 1 |
284 | 284 | } |
|
0 commit comments