- ci.yml → thin caller of peptide-e2e reusable CI (tests: brain-monkey) + keep check-constants as parallel job; workflow_call trigger enabled - deploy.yml: retire standalone validate job; gate on ci.yml via workflow_call - composer.json: add 'test' script (vendor/bin/phpunit --testdox) - Version bumped to 0.22.0 300-line splits (9 files over limit → all under 300): - class-keyword-extractor.php: shared tokeniser from Idea_Scorer + Semantic_Dedup - class-image-aspect-ratio.php: aspect-ratio snap from OR provider + OR batch - class-settings-sanitizer.php: option sanitization from Admin_Page - class-settings-fields-images.php: image fields from Settings_Fields_Extended - class-runware-image-validator.php: credential check from Runware_Image_Provider - Runware batch: 15 phpcs:disable lines → 1 grouped suppression Agent-Session: claude/adopt-ci-20260616
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
##
|
|
# CI caller — PRAutoBlogger
|
|
#
|
|
# Thin caller that delegates to the reusable estate CI workflow in peptide-e2e.
|
|
# workflow_call is required so deploy.yml can gate on this workflow via
|
|
# `uses: ./.github/workflows/ci.yml` (the workflow_call trigger enables that).
|
|
#
|
|
# Permissions: contents: write is required at the caller level so the reusable
|
|
# workflow's phpcbf auto-commit job can push fixes back to the PR branch.
|
|
# (GitHub enforces that callers cannot be escalated beyond their declared scope.)
|
|
#
|
|
# tests: brain-monkey — no WP install or DB required; Brain Monkey mocking only.
|
|
# line_limit_paths: includes — estate hard 300-line rule applied to includes/.
|
|
##
|
|
name: CI
|
|
|
|
on:
|
|
pull_request: {}
|
|
push:
|
|
branches: [main]
|
|
workflow_call: {}
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
ci:
|
|
uses: peptiderepo/peptide-e2e/.github/workflows/ci.yml@main
|
|
with:
|
|
tests: brain-monkey
|
|
secrets: inherit
|
|
|
|
check-constants:
|
|
name: Check PRAUTOBLOGGER_* constants
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Setup PHP 8.1
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '8.1'
|
|
coverage: none
|
|
- name: Check PRAUTOBLOGGER_* constants
|
|
# Fails if any PRAUTOBLOGGER_* constant referenced in the shipped
|
|
# plugin PHP is neither defined in prautoblogger.php nor guarded
|
|
# by defined() at the reference site. Prevents the v0.19.0 incident
|
|
# class (constant deleted from bootstrap, test fallback masks the gap).
|
|
run: php scripts/check-constants.php
|