feat: reusable ci.yml — estate CI standard (Phase 0, step 1) #19

Merged
peptiderepo merged 11 commits from claude/reusable-ci-20260616 into main 2026-06-16 12:12:07 +00:00
2 changed files with 9 additions and 38 deletions
Showing only changes of commit fa1df001ea - Show all commits

View File

@@ -1,15 +1,15 @@
name: CI Bisect Caller v2
name: CI Bisect Caller v3
on:
push:
branches: ['claude/**']
# NO permissions block — testing if job-level write in called workflow works
permissions:
contents: write # needed for called reusable workflow's phpcs job
jobs:
ci:
uses: ./.github/workflows/ci-bisect.yml
with:
tests: none
enforce_300: false
secrets: inherit

View File

@@ -1,56 +1,27 @@
name: CI Bisect Test v2
name: CI Bisect Test v3
on:
workflow_call:
inputs:
php_versions:
type: string
required: false
default: '["8.1","8.2","8.3"]'
tests:
type: string
required: false
default: stubs
enforce_300:
type: boolean
required: false
default: true
# NO top-level permissions block here
# No top-level permissions — only job-level where needed
jobs:
lint-php:
name: PHP Lint (${{ matrix.php }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ${{ fromJson(inputs.php_versions) }}
steps:
- run: echo "lint php ${{ matrix.php }}"
phpcs:
name: PHPCS
runs-on: ubuntu-latest
permissions:
contents: write # job-level write for phpcbf commit-back only
contents: write
steps:
- run: echo "phpcs"
file-size:
name: 300-line rule
runs-on: ubuntu-latest
if: ${{ inputs.enforce_300 }}
steps:
- run: echo "file size check"
- run: echo "phpcs with write"
phpunit:
name: PHPUnit (${{ inputs.tests }})
name: PHPUnit
runs-on: ubuntu-latest
if: ${{ inputs.tests != 'none' }}
strategy:
fail-fast: false
matrix:
php: ${{ fromJson(inputs.php_versions) }}
steps:
- run: echo "phpunit ${{ inputs.tests }}"