- Replace hand-rolled ci.yml jobs with thin caller to reusable estate workflow
(peptiderepo/peptide-e2e/.github/workflows/ci.yml@main); tests: stubs; has_js: false.
workflow_call + permissions: contents: write added per estate standard so deploy.yml
can gate on it and phpcbf auto-commit step has required token scope.
- Convert 7 hand-rolled test-*.php scripts to PHPUnit TestCase classes:
PeptideCptTest <- test-peptide-cpt.php
VerificationScannerTest <- test-verification-scanner.php
VerificationSettingsTest <- test-verification-settings.php
Migration0004Test <- test-migration-0004.php
JsonldTest <- test-jsonld.php
JsonldWebpageTest <- test-jsonld-webpage.php
JsonldPeptidePieceTest <- test-jsonld-peptide-piece.php
All assertions preserved; old scripts remain in tests/unit/ but CI no longer
runs them (PHPUnit discovery matches *Test.php only).
- Rewrite tests/bootstrap.php: full WP stub library for PHPUnit (WP_Post, WP_Error,
all option/cron/CPT/taxonomy/permalink stubs); registers PR_Core_Autoloader.
- Add phpunit.xml.dist (bootstrap, unit suite, includes/ coverage).
- Add phpunit/phpunit ^9.6 + yoast/phpunit-polyfills ^2.0 to require-dev.
- Add composer test script (vendor/bin/phpunit --configuration phpunit.xml.dist).
- deploy.yml: add permissions: contents: write.
- Version bump 0.6.2 -> 0.7.0.
Agent-Session: claude-adopt-ci-20260616
28 lines
681 B
YAML
28 lines
681 B
YAML
##
|
|
# Thin CI caller — peptide-repo-core
|
|
#
|
|
# Delegates all lint/test/file-size jobs to the estate reusable workflow.
|
|
# Per estate standard: workflow_call is required so deploy.yml can gate on it.
|
|
# See: peptiderepo/peptide-e2e/.github/workflows/ci.yml@main for job definitions.
|
|
##
|
|
name: CI
|
|
|
|
on:
|
|
pull_request: {}
|
|
push:
|
|
branches: [main]
|
|
workflow_call: {}
|
|
|
|
# Required: calling workflow must declare contents: write so the reusable
|
|
# phpcs job can commit phpcbf auto-fixes back to the PR branch.
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
ci:
|
|
uses: peptiderepo/peptide-e2e/.github/workflows/ci.yml@main
|
|
with:
|
|
tests: stubs
|
|
has_js: false
|
|
secrets: inherit
|