feat: add rtcamp-standard reusable workflow with build-artifact gate and PHPStan#683
Open
Adi-ty wants to merge 10 commits intotheme-elementary-v2from
Open
feat: add rtcamp-standard reusable workflow with build-artifact gate and PHPStan#683Adi-ty wants to merge 10 commits intotheme-elementary-v2from
Adi-ty wants to merge 10 commits intotheme-elementary-v2from
Conversation
…and PHPStan Introduces .github/workflows/rtcamp-standard.yml as a reusable workflow exposing two jobs: - build-artifact-gate: fails any PR that commits files under assets/build/ (configurable via build-artifact-paths input). Diffs PR head against the base ref and reports offending files with a fix hint. - phpstan: runs `composer phpstan` (gated by the run-phpstan input so callers can skip when no PHP files changed).
26ba591 to
ca8a1c3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a reusable CI workflow (
.github/workflows/rtcamp-standard.yml) that enforces build artifact gating and runs PHPStan static analysis. Also introduces a shared composite action for Node.js setup withnode_modulescaching.Technical Details
assets/build/. UsesFETCH_HEADdiff pattern consistent withpre-runjob. Handles renames/copies (--diff-filter=ACMR), strips whitespace from path inputs, and escapes regex metacharacters in paths.composer phpstanconditionally based on whether PHP-related files changed. UsesfromJSON()coercion for boolean input to avoid string-to-boolean edge cases..github/actions/setup-node-with-cachecomposite action cachesnode_moduleskeyed onpackage-lock.json+.npmrc+ Node version. Used by all Node-dependent jobs.rtcamp-standardis called fromtest-measure.ymlas a reusable workflow.Checklist
.github/workflows/rtcamp-standard.ymlcreated as a reusable workflowphpstan-baseline.neonfrom TASK-003)assets/build/assets/build/added to.gitignoreScreenshots
To-do
phpstan-baseline\.neonwas added to thepre-runPHP file detection regex so baseline-only changes trigger PHPStan.lint-jsjob failure is a pre-existing issue — ESLint 9 requireseslint.config.js(flat config) but the repo still uses.eslintrc.*. Unrelated to this PR.Fixes/Covers issue
Fixes #642