Commit Graph

12 Commits

Author SHA1 Message Date
peptiderepo
be686bb3e0 test: bisect ci.yml startup_failure (matrix+if+permissions)
Agent-Session: claude/reusable-ci-20260616
2026-06-16 11:37:21 +00:00
peptiderepo
84e1bfebfd test: minimal reusable workflow diagnostic
Adds ci-minimal.yml + ci-minimal-test.yml to diagnose the startup_failure
on the self-test reusable workflow call. To be removed after diagnosis.

Agent-Session: claude/reusable-ci-20260616
2026-06-16 11:36:29 +00:00
peptiderepo
e3be036d19 fix(ci-self-test): use relative path for same-repo reusable workflow call
GitHub requires ./.github/workflows/ci.yml (not @branch-ref) for same-repo
reusable workflow calls from a PR branch. The @claude/reusable-ci-20260616
ref caused startup_failure because GitHub can't resolve branch-ref reusable
workflows that aren't on main yet.

Agent-Session: claude/reusable-ci-20260616
2026-06-16 11:32:03 +00:00
peptiderepo
b5e54a4bdd feat: reusable ci.yml — estate CI standard (Phase 0, step 1)
Add .github/workflows/ci.yml as a reusable workflow_call entrypoint for
all 7 estate repos. Consistent job names (lint-php, phpcs, file-size,
phpunit, lint-js) so deploy-app.yml can needs: them uniformly.

Inputs: php_versions (JSON matrix), tests (stubs|wp-framework|brain-monkey|none),
enforce_300, line_limit_paths, has_js, phpcs_autofix.

phpcbf auto-commit: on pull_request, phpcbf runs and commits any auto-fixable
PHPCS violations back to the branch via GITHUB_TOKEN before strict phpcs.
On push events the commit step is skipped to prevent loops.

wp-framework PHPUnit path handles all three known WP CI gotchas:
(1) install svn (ubuntu-latest lacks it);
(2) skip-db-create=true (MySQL service pre-creates wp_tests via MYSQL_DATABASE);
(3) WP_CORE_DIR trailing slash (ABSPATH concatenation guard).

Also adds:
- .github/workflows/ci-self-test.yml: self-test caller (tests: none) so the
  reusable workflow is exercised on this PR.
- README.md: adoption snippet + full input reference for caller repos.
- CHANGELOG.md: v1.6.0 entry.

Agent-Session: claude/reusable-ci-20260616
2026-06-16 11:30:33 +00:00
peptiderepo
3c29588824 ci(deploy): promote smoke to a production gate (#10)
deploy-production now needs smoke; a smoke FAILURE blocks prod while a skipped
smoke (run_smoke:false) still allows it. Automated functional gate replacing
the removed human approval gate — hands-off but safe.

Agent-Session: cto gate-smoke

Co-authored-by: peptiderepo <peptiderepo@users.noreply.github.com>
2026-06-09 22:28:41 +07:00
peptiderepo
655843e42b ci(monitor): drop false drift alerts (#7)
Compare prod-deployment SHA to main and ignore changes confined to .github/,
tests/, and docs/build files (which the deploy excludes) — so infra-only commits
don't trip a false 'prod behind main' alert every day.

Agent-Session: cto monitor-drift-filter

Co-authored-by: peptiderepo <peptiderepo@users.noreply.github.com>
2026-06-09 14:15:28 +07:00
peptiderepo
afb43e7a41 ci: harden deploy + add health monitor (#5)
* ci(deploy): retry rsync on Hostinger runner-IP throttle + best-effort inventory guard

Pilot surfaced an exit-255 SSH connection timeout (documented Hostinger
rate-limiting of concurrent runner IPs). rsync now retries 4x/25s; the plugin
count guard is best-effort so a throttled check can't fail a good deploy.

Agent-Session: cto harden-deploy

* ci: add daily Deploy Health Monitor (drift + deploy-failure)

Scheduled GitHub Actions check (runs on GitHub infra, not the dead local cron):
for each app repo, compares the latest production deployment SHA to main and
flags failed deploy runs. Opens one de-duplicated 'deploy-health' issue when
something is off — the alarm that was missing when deploys silently broke.

Agent-Session: cto deploy-health-monitor

---------

Co-authored-by: peptiderepo <peptiderepo@users.noreply.github.com>
2026-06-09 14:11:28 +07:00
peptiderepo
852f7b01a3 ci: add shared reusable deploy workflow (#4)
Single staging→smoke→production pipeline callable by every plugin/theme repo
via workflow_call. Replaces six copy-pasted per-repo deploy.yml files so deploy
logic is fixed once. Includes the pre/post active-plugin-count guard, LiteSpeed
purge, and health checks. Callers pass target_path + secrets: inherit.

Agent-Session: cto reusable-deploy

Co-authored-by: peptiderepo <peptiderepo@users.noreply.github.com>
2026-06-09 14:03:21 +07:00
peptiderepo
da79ee234f fix(ci): explicitly checkout peptide-e2e in workflow_call context
When smoke.yml runs via workflow_call from another repo (peptide-repo-core,
peptide-starter-theme, etc.), GitHub Actions checks out the CALLER's repo
by default. The caller has no package-lock.json, so setup-node's npm cache
lookup fails with 'Some specified paths were not resolved'.

Fix: add repository/ref to the checkout step so we always fetch peptide-e2e
regardless of who calls the workflow. This ensures npm ci and Playwright
have the correct test code and dependency lockfile.
2026-04-27 15:37:34 +00:00
peptiderepo
3b8a7d3065 fix(ci): use inputs.base_url directly (default already declared); drop double-quote expression 2026-04-27 12:32:40 +07:00
peptiderepo
d781207252 fix(ci): correct working-directory — package-lock.json is at repo root, not e2e/ 2026-04-27 12:27:49 +07:00
peptiderepo
d46a1e4680 feat: initial Playwright smoke suite
20 tests across 5 files covering all plugin surfaces on staging:
- Homepage load and PHP fatal detection
- Reconstitution Calculator shortcode + math
- Peptide Search AI widget + AJAX response
- Admin: all plugins active, PSA + PRAutoBlogger settings pages
- REST API: prc/v1/presets, peptides/v1/search, compounds, CPT types

Staging shortcode pages:
  /reconstitution-calculator/ - [prc_calculator]
  /search-peptides/           - [peptide_search]
  /peptide-directory/         - [peptide_directory]

GHA workflow: smoke.yml supports manual dispatch + workflow_call
for use as a deploy gate from plugin repos.
2026-04-26 04:39:13 +00:00