Your mojo-toml repo now has local validation tools that match modular-community CI exactly.
-
Validation Script -
scripts/validate-recipe.sh- Runs rattler-build validation locally
- Same checks as modular-community CI
- Fast feedback before PR submission
-
GitHub Actions -
.github/workflows/validate-recipe.yml- Auto-validates on push/PR
- Shows results in Actions tab
-
recipe.yaml - Root-level recipe file
- Validated schema (tests:, documentation:, repository:)
- Mojo 0.25.7 with context variables
- Ready for modular-community submission
-
Documentation -
docs/RECIPE_VALIDATION.md- Complete validation guide
- Common error reference
- Integration examples
cd /Users/mjboothaus/code/github/databooth/mojo-toml
./scripts/validate-recipe.sh recipe.yamlExpected output:
✅ Recipe validation passed!
Your recipe.yaml follows the modular-community schema.
Copy these files to your other packages:
# For each of: mojo-yaml, mojo-dotenv, mojo-ini, mojo-asciichart
cp scripts/validate-recipe.sh ../mojo-yaml/scripts/
cp .github/workflows/validate-recipe.yml ../mojo-yaml/.github/workflows/
cp docs/RECIPE_VALIDATION.md ../mojo-yaml/docs/
# Copy recipe from modular-community (already validated)
cp /path/to/modular-community/recipes/mojo-yaml/recipe.yaml ../mojo-yaml/The GitHub Actions workflow runs automatically when recipe.yaml changes. View results at:
https://github.com/DataBooth/mojo-toml/actions
Add to .pre-commit-config.yaml:
- repo: local
hooks:
- id: validate-recipe
name: Validate recipe.yaml
entry: ./scripts/validate-recipe.sh
language: system
files: ^recipe\.yaml$
pass_filenames: falseThen: pre-commit install
Add to justfile:
validate-recipe:
./scripts/validate-recipe.sh recipe.yamlUsage: just validate-recipe
Add to pixi.toml:
[tasks]
validate-recipe = "./scripts/validate-recipe.sh recipe.yaml"Usage: pixi run validate-recipe
- Update recipe.yaml - Make your changes
- Validate locally -
./scripts/validate-recipe.sh recipe.yaml - Fix issues - If validation fails
- Commit - Once validation passes
- Submit PR - To modular-community with confidence
- ✅ Catch errors early - Before PR submission
- ✅ Faster iteration - No waiting for CI
- ✅ Same validation - Exact same tools as modular-community
- ✅ Automated checks - GitHub Actions integration
- ✅ Clear feedback - Helpful error messages
See docs/RECIPE_VALIDATION.md for:
- Complete setup instructions
- Common schema errors reference
- Troubleshooting guide
- Advanced usage
- Test validation:
./scripts/validate-recipe.sh recipe.yaml - Add to pre-commit: Edit
.pre-commit-config.yaml - Replicate to other packages: Copy files as shown above
- Read full guide:
docs/RECIPE_VALIDATION.md