-
Notifications
You must be signed in to change notification settings - Fork 0
fix(init): harden --list/--json into a real machine contract #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e21fe41
fix(init): harden --list/--json into a real machine contract
Adi-ty 80d30f1
feat(scaffolds): add ci/test-measure consolidated CI workflow
Adi-ty 4ff2bf3
feat(debug): add opt-in diagnostic logger; harden init/scaffold AI co…
Adi-ty 7211881
fix: address copilot review findings across init engine and scaffolds
Adi-ty a7973b9
fix: filesystem error handling, Modules collapse edge case, and retir…
Adi-ty 0dd4158
fix: improve identity error message wording and redact sensitive argv…
Adi-ty 6615ff8
fix(init): harden debug logging and input validation
Adi-ty File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
node-packages/wp-tooling/scaffolds/ci/test-measure/scaffold.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| { | ||
| "slug": "test-measure", | ||
| "category": "ci", | ||
| "name": "CI: Test and Measure (consolidated)", | ||
| "description": "One caller workflow delegating lint (CSS/JS/PHP), JS tests, a PHP test matrix, build, the build-artifact gate, and optional a11y to the wp-ci.yml orchestrator in rtCamp/wp-shared-workflows. Jobs are gated on detected changes. Use this instead of the per-check ci/* callers; unlike them it supports a PHP x WP matrix.", | ||
| "source": "template", | ||
| "inputs": [ | ||
| { | ||
| "key": "wsw_ref", | ||
| "description": "Git ref of rtCamp/wp-shared-workflows to pin (tag, branch, or SHA).", | ||
| "default": "release/v1.0.0" | ||
| }, | ||
| { | ||
| "key": "project_type", | ||
| "description": "Project shape the orchestrator presets on: plugin | theme | package.", | ||
| "default": "plugin" | ||
| }, | ||
| { | ||
| "key": "default_branch", | ||
| "description": "Branch the push trigger watches (pull requests always trigger).", | ||
| "default": "main" | ||
| }, | ||
| { | ||
| "key": "php_versions", | ||
| "description": "JSON array of PHP versions for the test-php matrix, crossed with wp_versions.", | ||
| "default": "[\"8.2\", \"8.3\", \"8.4\"]" | ||
| }, | ||
| { | ||
| "key": "wp_versions", | ||
| "description": "JSON array of WordPress core versions for the test-php matrix, crossed with php_versions.", | ||
| "default": "[\"6.7\", \"6.8\", \"6.9\", \"7.0\"]" | ||
| }, | ||
| { | ||
| "key": "test_php_exclude", | ||
| "description": "JSON array of {php, wp} cells to drop from the matrix, e.g. [{\"php\": \"8.4\", \"wp\": \"6.5\"}].", | ||
| "default": "[]" | ||
| }, | ||
| { | ||
| "key": "run_a11y", | ||
| "description": "Set to true to run the (slow) pa11y accessibility job on every run.", | ||
| "default": "false" | ||
| } | ||
| ], | ||
| "files": [ | ||
| { | ||
| "src": "templates/test-measure.yml.mustache", | ||
| "dest": ".github/workflows/test-measure.yml" | ||
| } | ||
| ], | ||
| "tests": [ | ||
| { | ||
| "src": "templates/test-measure.yml.mustache", | ||
| "dest": ".github/workflows/test-measure.yml", | ||
| "framework": "actionlint" | ||
| } | ||
| ] | ||
| } | ||
36 changes: 36 additions & 0 deletions
36
node-packages/wp-tooling/scaffolds/ci/test-measure/templates/test-measure.yml.mustache
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| name: Test and Measure | ||
|
|
||
| # Scaffolded by @rtcamp/wp-tooling. | ||
| # Single caller that delegates lint, JS/PHP tests (PHP x WP matrix), build, | ||
| # the build-artifact gate, and optional a11y to the wp-ci.yml orchestrator; | ||
| # every job there is gated on detected changes. | ||
| # Source: https://github.com/rtCamp/wp-shared-workflows/blob/{{wsw_ref}}/.github/workflows/wp-ci.yml | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - synchronize | ||
| - reopened | ||
| - ready_for_review | ||
| push: | ||
| branches: | ||
| - {{default_branch}} | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| # Cancel previous in-flight runs of this workflow for the same ref. | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| ci: | ||
| uses: rtCamp/wp-shared-workflows/.github/workflows/wp-ci.yml@{{wsw_ref}} | ||
| with: | ||
| project-type: {{project_type}} | ||
| php-versions: '{{php_versions}}' | ||
| wp-versions: '{{wp_versions}}' | ||
| test-php-exclude: '{{test_php_exclude}}'{{#run_a11y}} | ||
| run-a11y: true{{/run_a11y}} |
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.