- Directory rename: fragments/ → ingredients/ (54 .ks files) - Updated all Python scripts: * tests/integration/conftest.py - fixture renames * tests/integration/test_integration.py - constant and path updates * tests/test_recipe_generator.py - updated test assertions * recipe-generator/validators.py - updated comments and error messages * recipe-generator/recipe_generator.py - updated comment - Updated all YAML files: * recipe-generator/recipe_templates.yaml - 66 path references * .gitea/workflows/validate-fragments.yaml → validate-ingredients.yaml * .gitea/workflows/test-generation.yaml - path patterns - Updated scripts: * bin/ksflatten-relative - updated path detection - Updated test file: * tests/integration/test_fragments.py → test_ingredients.py - Updated documentation: * DEVELOPMENT.md - simplified references * DEVELOPMENT_QUICK.md - updated examples * tests/container/README.md - test references - Regenerated all recipes (16 files) with ingredient paths - Updated test fixtures (7 files) - All integration tests pass (5/5) - All unit tests pass (29/31 - 2 pre-existing failures unrelated)
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: validate-ingredients
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'ingredients/**/*.ks'
|
|
pull_request:
|
|
paths:
|
|
- 'ingredients/**/*.ks'
|
|
|
|
jobs:
|
|
validate:
|
|
runs-on: fedora
|
|
container:
|
|
image: git.phyllo.me/devops/fedora-runner-image:latest
|
|
|
|
steps:
|
|
- uses: https://git.phyllo.me/devops/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install pykickstart
|
|
run: pip install pykickstart
|
|
|
|
- name: Validate all ingredients
|
|
run: |
|
|
errors=0
|
|
for ingredient in $(find ingredients -name "*.ks"); do
|
|
if python3 -c "
|
|
from pykickstart.parser import KickstartParser
|
|
from pykickstart.version import makeVersion, DEVEL
|
|
parser = KickstartParser(makeVersion(DEVEL))
|
|
parser.readKickstart(open('$ingredient').read())
|
|
" 2>/dev/null; then
|
|
echo "✓ $ingredient"
|
|
else
|
|
echo "✗ $ingredient"
|
|
errors=$((errors + 1))
|
|
fi
|
|
done
|
|
echo "Ingredient validation complete: $errors errors"
|
|
exit $errors
|