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
This commit is contained in:
23
.github/workflows/ci-self-test.yml
vendored
Normal file
23
.github/workflows/ci-self-test.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
# Self-test: exercises the reusable ci.yml on this repo itself.
|
||||
# Uses tests: none (peptide-e2e is a Playwright/Node repo, no PHP suite)
|
||||
# and has_js: false (the JS is TypeScript, not linted via npm run lint here).
|
||||
# Purpose: smoke-check that the reusable workflow parses and runs without
|
||||
# errors on every push/PR to this repo.
|
||||
|
||||
name: CI Self-Test (reusable ci.yml)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, 'claude/**']
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
uses: peptiderepo/peptide-e2e/.github/workflows/ci.yml@claude/reusable-ci-20260616
|
||||
with:
|
||||
tests: none
|
||||
enforce_300: false
|
||||
has_js: false
|
||||
phpcs_autofix: false
|
||||
secrets: inherit
|
||||
Reference in New Issue
Block a user