- 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
21 lines
572 B
XML
21 lines
572 B
XML
<?xml version="1.0"?>
|
|
<phpunit
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
|
|
bootstrap="tests/bootstrap.php"
|
|
backupGlobals="false"
|
|
colors="true"
|
|
>
|
|
<testsuites>
|
|
<testsuite name="unit">
|
|
<directory suffix="Test.php">./tests/unit</directory>
|
|
</testsuite>
|
|
</testsuites>
|
|
|
|
<coverage processUncoveredFiles="true">
|
|
<include>
|
|
<directory suffix=".php">./includes</directory>
|
|
</include>
|
|
</coverage>
|
|
</phpunit>
|