test: bisect v3 — caller has write, called has only job-level write

Agent-Session: claude/reusable-ci-20260616
This commit is contained in:
peptiderepo
2026-06-16 11:42:38 +00:00
parent d0f4844af8
commit fa1df001ea
2 changed files with 9 additions and 38 deletions

View File

@@ -1,15 +1,15 @@
name: CI Bisect Caller v2 name: CI Bisect Caller v3
on: on:
push: push:
branches: ['claude/**'] 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: jobs:
ci: ci:
uses: ./.github/workflows/ci-bisect.yml uses: ./.github/workflows/ci-bisect.yml
with: with:
tests: none tests: none
enforce_300: false
secrets: inherit secrets: inherit

View File

@@ -1,56 +1,27 @@
name: CI Bisect Test v2 name: CI Bisect Test v3
on: on:
workflow_call: workflow_call:
inputs: inputs:
php_versions:
type: string
required: false
default: '["8.1","8.2","8.3"]'
tests: tests:
type: string type: string
required: false required: false
default: stubs 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: 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: phpcs:
name: PHPCS name: PHPCS
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: write # job-level write for phpcbf commit-back only contents: write
steps: steps:
- run: echo "phpcs" - run: echo "phpcs with write"
file-size:
name: 300-line rule
runs-on: ubuntu-latest
if: ${{ inputs.enforce_300 }}
steps:
- run: echo "file size check"
phpunit: phpunit:
name: PHPUnit (${{ inputs.tests }}) name: PHPUnit
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ inputs.tests != 'none' }} if: ${{ inputs.tests != 'none' }}
strategy:
fail-fast: false
matrix:
php: ${{ fromJson(inputs.php_versions) }}
steps: steps:
- run: echo "phpunit ${{ inputs.tests }}" - run: echo "phpunit ${{ inputs.tests }}"