Files
magnus919_agent-skills/.github/workflows/validate.yml
T
usernameandfactory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> 476d7e11b0 feat(ci): add linting, formatting, coverage, and security configs
Add ruff linter/formatter with pre-commit hooks, pytest-cov with 60%
coverage threshold, CODEOWNERS, Dependabot for pip/GHA updates, and
.env.example. Auto-fix existing ruff violations across eval_runner/
and scripts/.

10 agent-readiness criteria resolved: lint_config, formatter,
pre_commit_hooks, naming_consistency, dead_code_detection,
test_coverage_thresholds, test_performance_tracking, codeowners,
dependency_update_automation, env_template.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-07-29 17:43:41 -04:00

73 lines
2.8 KiB
YAML

name: Validate skills
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Python validator dependencies
run: python3 -m pip install -r requirements-dev.txt
- name: Lint Python (ruff)
run: python3 -m ruff check scripts/ eval_runner/
- name: Check Python formatting (ruff)
run: python3 -m ruff format --check scripts/ eval_runner/
- name: Validate skill format and links
run: ruby scripts/validate-skills.rb
- name: Test eval manifest validation
run: python3 scripts/test-eval-validation.py
- name: Validate eval manifests
run: python3 scripts/validate-evals.py
- name: Test life-coach capability validation
run: python3 -m unittest discover -s life-coach/tests -p 'test_*.py'
- name: Run core test suite with coverage
run: python3 -m pytest scripts/ eval_runner/tests/ -v --durations=10 --cov=scripts --cov=eval_runner --cov-fail-under=60 --cov-report=term-missing
- name: Test changed-skill quality validation
run: ruby scripts/test-validate-skill-quality.rb
- name: Validate changed skill quality
env:
SKILL_QUALITY_BASE: ${{ github.event.pull_request.base.sha || github.event.before }}
run: ruby scripts/validate-skill-quality.rb --base "$SKILL_QUALITY_BASE"
- name: Check tracked repository artifacts
run: python3 scripts/check-artifacts.py
- name: Validate Claude Code marketplace
run: ruby scripts/gen-claude-marketplace.rb
- name: Validate Codex plugin packaging
run: ruby scripts/gen-codex-plugin.rb
- name: Test eval coverage ratchet
run: python3 scripts/test-eval-coverage.py
- name: Report eval coverage
run: python3 scripts/eval-coverage.py
- name: Enforce eval coverage ratchet
env:
EVAL_RATCHET_BASE: ${{ github.event.pull_request.base.sha || github.event.before }}
run: python3 scripts/eval-coverage.py --modified-from "$EVAL_RATCHET_BASE"
- name: Test llms.txt generator
run: ruby scripts/test-gen-llms-txt.rb
- name: Validate llms.txt catalog
run: ruby scripts/gen-llms-txt.rb
- name: Build tracked Python packages
run: |
wheel_dir=$(mktemp -d)
while IFS= read -r pyproject; do
python3 -m pip wheel --no-deps "./$(dirname "$pyproject")" --wheel-dir "$wheel_dir"
done < <(git ls-files -- ':(glob)**/pyproject.toml')