feat: reusable ci.yml — estate CI standard (Phase 0, step 1) #19
6
.github/workflows/ci-bisect-caller.yml
vendored
6
.github/workflows/ci-bisect-caller.yml
vendored
@@ -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
|
||||||
|
|||||||
41
.github/workflows/ci-bisect.yml
vendored
41
.github/workflows/ci-bisect.yml
vendored
@@ -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 }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user