5 Commits

Author SHA1 Message Date
unkinben db5a829429 test: validate all metadata.yaml files against schema in pytest
ci/woodpecker/pr/build-fedora42 Pipeline was successful
ci/woodpecker/pr/build-fedora44 Pipeline was successful
ci/woodpecker/pr/build-fedora43 Pipeline was successful
ci/woodpecker/pr/build-almalinux9 Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build-almalinux8 Pipeline was successful
2026-05-17 12:32:46 +10:00
unkinben ff34987784 refactor: use make test in pre-commit hook 2026-05-17 12:30:35 +10:00
unkinben f46e8bfc0b feat: add pytest pre-commit hook and tests scaffold (issue #162)
- pyproject.toml with pytest>=8 in [dependency-groups.dev] so
  uv run --group dev pytest resolves without a global install
- tests/__init__.py and tests/conftest.py skeleton referencing issue #162
- pre-commit local hook runs pytest tests/ on Python file changes;
  exit code 5 (no tests collected) is treated as success so commits
  are not blocked while the test suite is being built out
2026-05-17 12:30:35 +10:00
unkinben 26c399598c feat: JSON Schema validation for metadata.yaml as pre-commit hook
Adds schema/metadata.json (JSON Schema draft-07) as the authoritative
schema for all rpms/*/metadata.yaml files.  Key constraints:

- additionalProperties: false at both the top level and builds items,
  so unknown fields are rejected outright
- name allows dots (fixes neovim-glibc-2.17)
- github is optional (fixes claude-code, which has no GitHub repo)
- repository enum includes fedora/42, fedora/43, fedora/44
- dist_tag boolean field documented in schema

Pre-commit hook (check-jsonschema 0.37.2) runs against every file
matching ^rpms/[^/]+/metadata\.yaml$ on every commit.

Also fixes rpms/claude-code/metadata.yaml: removes the unknown
claude_ai field and normalises field order.
2026-05-17 12:30:35 +10:00
unkinben aeea587aeb fix: move unkin-undionly-kpxe preinstall.sh to scripts/ subdirectory (#166)
ci/woodpecker/push/deploy-fedora42 Pipeline was successful
ci/woodpecker/push/deploy-fedora43 Pipeline was successful
ci/woodpecker/push/deploy-almalinux9 Pipeline was successful
ci/woodpecker/push/deploy-fedora44 Pipeline was successful
ci/woodpecker/push/deploy-almalinux8 Pipeline was successful
nfpm.yaml referenced /app/resources/scripts/preinstall.sh but the file
was at resources/preinstall.sh, causing the build to fail.

Reviewed-on: #166
2026-05-17 12:29:10 +10:00
2 changed files with 1 additions and 0 deletions
+1
View File
@@ -47,6 +47,7 @@ repos:
name: Validate RPM package metadata
files: ^rpms/[^/]+/metadata\.yaml$
args: [--schemafile, schema/metadata.json]
language_version: python3.11
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.7