- Split generate_recipe.py into cli.py, recipe_generator.py, validators.py, manifest.py - Removed override logic - modifiers now add fragments rather than replace - Added filename deduplication to prevent overwriting recipes - Updated CI workflows and tests to use new module structure - Made pykickstart a hard dependency - Removed ingredients/ directory support (only fragments/*.ks now used) - New layout: 5 modules (~990 lines) vs single 769-line file
51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
name: validate-recipes
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
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 dependencies
|
|
run: |
|
|
pip install PyYAML pytest pykickstart
|
|
|
|
- name: Generate all recipes
|
|
run: |
|
|
cd recipe-generator
|
|
make generate-recipes
|
|
|
|
- name: Validate recipes (strict mode)
|
|
run: |
|
|
cd recipe-generator
|
|
python3 generate_recipe.py --validate ../recipes/*.cfg --strict
|
|
|
|
- name: Run unit tests
|
|
run: |
|
|
cd recipe-generator
|
|
make test
|
|
|
|
- name: Run integration tests
|
|
run: |
|
|
cd recipe-generator
|
|
make test-integration
|
|
|
|
- name: Upload test results
|
|
if: always()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: test-results
|
|
path: _pytest_cache/
|
|
if-no-files-found: ignore
|