From fa1df001eafab7d1382d734896712f1e7ccc7718 Mon Sep 17 00:00:00 2001 From: peptiderepo Date: Tue, 16 Jun 2026 11:42:38 +0000 Subject: [PATCH] =?UTF-8?q?test:=20bisect=20v3=20=E2=80=94=20caller=20has?= =?UTF-8?q?=20write,=20called=20has=20only=20job-level=20write?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Agent-Session: claude/reusable-ci-20260616 --- .github/workflows/ci-bisect-caller.yml | 6 ++-- .github/workflows/ci-bisect.yml | 41 ++++---------------------- 2 files changed, 9 insertions(+), 38 deletions(-) diff --git a/.github/workflows/ci-bisect-caller.yml b/.github/workflows/ci-bisect-caller.yml index d08efba..04d7f06 100644 --- a/.github/workflows/ci-bisect-caller.yml +++ b/.github/workflows/ci-bisect-caller.yml @@ -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 diff --git a/.github/workflows/ci-bisect.yml b/.github/workflows/ci-bisect.yml index 3efc789..010f147 100644 --- a/.github/workflows/ci-bisect.yml +++ b/.github/workflows/ci-bisect.yml @@ -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 }}"