feat: reusable ci.yml — estate CI standard (Phase 0, step 1) #19
8
.github/workflows/ci-self-test.yml
vendored
8
.github/workflows/ci-self-test.yml
vendored
@@ -1,10 +1,8 @@
|
|||||||
# Self-test: exercises the reusable ci.yml on this repo itself.
|
# Self-test: exercises the reusable ci.yml on this repo itself.
|
||||||
# Uses tests: none (peptide-e2e is a Playwright/Node repo, no PHP suite).
|
# Uses tests: none (peptide-e2e is a Playwright/Node repo, no PHP suite).
|
||||||
# Purpose: smoke-check that the reusable workflow parses and the job
|
# phpcs_autofix: false avoids needing contents: write at the caller level
|
||||||
# skeleton runs without YAML/startup errors.
|
# (the phpcs job in ci.yml has its own job-level write permission for phpcbf).
|
||||||
#
|
# Purpose: smoke-check that the reusable workflow skeleton runs without errors.
|
||||||
# Note: uses a relative path (./.github/workflows/ci.yml) — the correct
|
|
||||||
# form for same-repo reusable workflow calls on PR branches.
|
|
||||||
|
|
||||||
name: CI Self-Test (reusable ci.yml)
|
name: CI Self-Test (reusable ci.yml)
|
||||||
|
|
||||||
|
|||||||
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@@ -50,6 +50,9 @@
|
|||||||
# and concatenated verbatim — missing slash produces wrong path).
|
# and concatenated verbatim — missing slash produces wrong path).
|
||||||
# - Every repo calls `composer test` regardless of the `tests` input; the
|
# - Every repo calls `composer test` regardless of the `tests` input; the
|
||||||
# input only controls environment provisioning, not the command.
|
# input only controls environment provisioning, not the command.
|
||||||
|
# - permissions: contents: read at workflow level; the phpcs job sets
|
||||||
|
# contents: write for phpcbf commit-back only. Calling workflows do NOT
|
||||||
|
# need to declare contents: write — job-level override is sufficient.
|
||||||
##
|
##
|
||||||
|
|
||||||
name: CI — Reusable
|
name: CI — Reusable
|
||||||
@@ -98,7 +101,7 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write # required for phpcbf auto-commit to the PR branch
|
contents: read # jobs that need write declare it explicitly (phpcs)
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
@@ -139,6 +142,8 @@ jobs:
|
|||||||
phpcs:
|
phpcs:
|
||||||
name: PHPCS (WordPress standards)
|
name: PHPCS (WordPress standards)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write # allows phpcbf auto-fix commits back to the PR branch
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user