diff --git a/node-packages/wp-tooling/CHANGELOG.md b/node-packages/wp-tooling/CHANGELOG.md index 68a291f..2dfc670 100644 --- a/node-packages/wp-tooling/CHANGELOG.md +++ b/node-packages/wp-tooling/CHANGELOG.md @@ -10,6 +10,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - `detect-changes` buckets the remaining tool config files that change what a job checks, so a pull request that only touches one no longer skips that job. `php` now claims `phpcs*.xml` and `.phpcs*.xml` (with or without `.dist`, so `phpcs.i18n.xml.dist` and `phpcs-custom.xml` count), `phpunit*.xml(.dist)`, `.wp-env.json` and its `.wp-env..json` variants, and `.distignore`. `js` also claims `jest.config.json` and `tsconfig*.json` / `jsconfig*.json` (any name, such as `tsconfig-base.json` or `tsconfig.app.build.json`), and `css` also claims `postcss.config.*`. `.nvmrc` counts under `css`, `js` and `php` (test-php runs `wp-env` on that Node version), `.browserslistrc` under `css` and `js`, and `block.json` under `js` and `php`. rtCamp/wp-shared-workflows lints the whole project when a bucket's list holds anything but source files, so a ruleset change is checked against every file. - The `wp-tooling` binary waits for stdout and stderr to drain before it exits. Writes to a pipe are asynchronous on POSIX, so a report longer than the pipe buffer piped into a reader that was not ready yet (`wp-tooling list --json | jq`) arrived cut off at 64 KiB, as invalid JSON, and a long error message on stderr was cut the same way. Exit codes are unchanged, and a closed pipe on either stream (`2>&1 | head`) exits straight away with the command's own code instead of 1. +- The CI scaffolds call rtCamp/wp-shared-workflows at `@v1`. `ci/lint-css`, `ci/lint-js` and `ci/lint-php` defaulted to the `v1.0.0/task/ci-lint-workflows` branch, which no longer exists, so a workflow scaffolded with the defaults failed before any job ran. `ci/test-measure` defaulted to the stale `release/v1.0.0` branch. The lint templates and the `wp-tooling list` descriptions drop their outdated "EXPERIMENTAL" wording. +- `ci/cd-wporg` works. It passed inputs and secrets `cd-wp-org.yml` never had (`plugin-slug`, `svn-username`, `svn-password`) and deployed an artifact nothing built, so it failed before any job ran. It now builds with `ci-build.yml`, packages with `npx @rtcamp/wp-tooling release:zip` (honouring `.distignore`; the scoped name, so npx never fetches an unrelated `wp-tooling` package from the registry), and deploys with `cd-wp-org.yml`'s `slug`, `tag`, `artifact-name` and `WP_ORG_USERNAME`/`WP_ORG_PASSWORD`. New inputs: `wsw_ref`, `build_command`, `assets_path`. +- `node_version` in the `ci/build`, `ci/lint-css`, `ci/lint-js`, `ci/test-a11y`, `ci/test-js` and `ci/test-php` scaffolds defaults to empty, which leaves `node-version` out of the generated workflow, so the shared workflow uses the project's `.nvmrc`. The old default of `22` overrode `.nvmrc`. Passing `--node_version` still pins a version. +- `ci/test-measure`'s default WordPress versions include 7.1. ### Changed diff --git a/node-packages/wp-tooling/scaffolds/ci/artifact-gate/scaffold.json b/node-packages/wp-tooling/scaffolds/ci/artifact-gate/scaffold.json index 550cac2..05a1db4 100644 --- a/node-packages/wp-tooling/scaffolds/ci/artifact-gate/scaffold.json +++ b/node-packages/wp-tooling/scaffolds/ci/artifact-gate/scaffold.json @@ -2,7 +2,7 @@ "slug": "artifact-gate", "category": "ci", "name": "CI: Block committed build artifacts", - "description": "GitHub Actions workflow that calls rtCamp/wp-shared-workflows ci-build-artifact-gate.yml. Fails the PR if build outputs (assets/build/ by default) are committed. Stable (merged into release/v1.0.0).", + "description": "GitHub Actions workflow that calls rtCamp/wp-shared-workflows ci-build-artifact-gate.yml. Fails the PR if build outputs (assets/build/ by default) are committed. Calls `@v1` by default.", "source": "template", "inputs": [ { diff --git a/node-packages/wp-tooling/scaffolds/ci/build/scaffold.json b/node-packages/wp-tooling/scaffolds/ci/build/scaffold.json index 8812879..aff5dd6 100644 --- a/node-packages/wp-tooling/scaffolds/ci/build/scaffold.json +++ b/node-packages/wp-tooling/scaffolds/ci/build/scaffold.json @@ -2,7 +2,7 @@ "slug": "build", "category": "ci", "name": "CI: production build", - "description": "GitHub Actions workflow that calls rtCamp/wp-shared-workflows ci-build.yml. Produces a production build (npm and/or composer) and optionally uploads the result as an artifact for downstream CD jobs. Stable (merged into release/v1.0.0).", + "description": "GitHub Actions workflow that calls rtCamp/wp-shared-workflows ci-build.yml. Produces a production build (npm and/or composer) and optionally uploads the result as an artifact for downstream CD jobs. Calls `@v1` by default.", "source": "template", "inputs": [ { @@ -12,8 +12,8 @@ }, { "key": "node_version", - "description": "Node.js version for the build.", - "default": "22" + "description": "Node.js version. Leave empty to use the project's .nvmrc, which the shared workflow reads.", + "default": "" }, { "key": "php_version", diff --git a/node-packages/wp-tooling/scaffolds/ci/build/templates/ci-build.yml.mustache b/node-packages/wp-tooling/scaffolds/ci/build/templates/ci-build.yml.mustache index 0411f1a..eb76e83 100644 --- a/node-packages/wp-tooling/scaffolds/ci/build/templates/ci-build.yml.mustache +++ b/node-packages/wp-tooling/scaffolds/ci/build/templates/ci-build.yml.mustache @@ -20,7 +20,7 @@ jobs: uses: rtCamp/wp-shared-workflows/.github/workflows/ci-build.yml@{{wsw_ref}} with: install-node-deps: true - install-composer-deps: {{install_composer_deps}} - node-version: "{{node_version}}" + install-composer-deps: {{install_composer_deps}}{{#node_version}} + node-version: "{{node_version}}"{{/node_version}} php-version: "{{php_version}}" upload-artifact: {{upload_artifact}} diff --git a/node-packages/wp-tooling/scaffolds/ci/cd-wporg/scaffold.json b/node-packages/wp-tooling/scaffolds/ci/cd-wporg/scaffold.json index 758a36a..86963b9 100644 --- a/node-packages/wp-tooling/scaffolds/ci/cd-wporg/scaffold.json +++ b/node-packages/wp-tooling/scaffolds/ci/cd-wporg/scaffold.json @@ -2,13 +2,28 @@ "slug": "cd-wporg", "category": "ci", "name": "WordPress.org deploy", - "description": "Deploys built plugin asset to WordPress.org SVN on each GitHub release. Wraps the wp-shared-workflows reusable.", + "description": "Builds and packages the plugin, then deploys it to WordPress.org SVN on each published GitHub release, with the wp-shared-workflows ci-build.yml and cd-wp-org.yml.", "source": "template", "inputs": [ { "key": "plugin_slug", "description": "WordPress.org plugin slug (must match the slug registered with .org).", "required": true + }, + { + "key": "wsw_ref", + "description": "Tag or ref of rtCamp/wp-shared-workflows to call. Pin a major tag such as `v1`, never a branch: branches move or get deleted.", + "default": "v1" + }, + { + "key": "build_command", + "description": "Builds the plugin and leaves exactly the files to deploy in dist/plugin (readme.txt at its root). The default builds, packages with `wp-tooling release:zip` (which honours .distignore) and unpacks the zip; python3 is used because self-hosted runners have no unzip.", + "default": "npm run build:prod && npx @rtcamp/wp-tooling release:zip && python3 -m zipfile -e dist/*.zip dist/package && mv dist/package/*/ dist/plugin" + }, + { + "key": "assets_path", + "description": "Directory mapped to SVN /assets/ (banners, icons, screenshots). Skipped if it does not exist.", + "default": ".wordpress-org" } ], "files": [ diff --git a/node-packages/wp-tooling/scaffolds/ci/cd-wporg/templates/cd-wporg.yml.mustache b/node-packages/wp-tooling/scaffolds/ci/cd-wporg/templates/cd-wporg.yml.mustache index bcf99ad..941b417 100644 --- a/node-packages/wp-tooling/scaffolds/ci/cd-wporg/templates/cd-wporg.yml.mustache +++ b/node-packages/wp-tooling/scaffolds/ci/cd-wporg/templates/cd-wporg.yml.mustache @@ -1,14 +1,38 @@ name: Deploy to WordPress.org +# Scaffolded by @rtcamp/wp-tooling. +# Builds and packages the plugin, then deploys it to WordPress.org SVN on each +# published GitHub release, with the reusable ci-build.yml and cd-wp-org.yml from +# rtCamp/wp-shared-workflows. +# +# The release tag (a leading v is stripped) must match readme.txt's Stable tag. +# Needs the WPORG_USERNAME and WPORG_PASSWORD repository secrets. + on: release: types: [published] +permissions: + contents: read + jobs: + build: + uses: rtCamp/wp-shared-workflows/.github/workflows/ci-build.yml@{{wsw_ref}} + with: + install-composer-deps: true + build-command: '{{build_command}}' + upload-artifact: true + artifact-name: wporg-package + artifact-path: dist/plugin + deploy: - uses: rtCamp/wp-shared-workflows/.github/workflows/cd-wp-org.yml@v1.0.0 + needs: build + uses: rtCamp/wp-shared-workflows/.github/workflows/cd-wp-org.yml@{{wsw_ref}} with: - plugin-slug: {{plugin_slug}} + slug: {{plugin_slug}} + tag: ${{ github.event.release.tag_name }} + artifact-name: wporg-package + assets-path: {{assets_path}} secrets: - svn-username: ${{ secrets.WPORG_USERNAME }} - svn-password: ${{ secrets.WPORG_PASSWORD }} + WP_ORG_USERNAME: ${{ secrets.WPORG_USERNAME }} + WP_ORG_PASSWORD: ${{ secrets.WPORG_PASSWORD }} diff --git a/node-packages/wp-tooling/scaffolds/ci/lint-css/scaffold.json b/node-packages/wp-tooling/scaffolds/ci/lint-css/scaffold.json index 4d2ebca..0a883ed 100644 --- a/node-packages/wp-tooling/scaffolds/ci/lint-css/scaffold.json +++ b/node-packages/wp-tooling/scaffolds/ci/lint-css/scaffold.json @@ -2,18 +2,18 @@ "slug": "lint-css", "category": "ci", "name": "CI: Lint CSS (Stylelint)", - "description": "GitHub Actions workflow that calls rtCamp/wp-shared-workflows ci-lint-css.yml. Runs Stylelint over changed files in a PR, or the whole project on push. EXPERIMENTAL: the upstream workflow is currently in rtCamp/wp-shared-workflows PR #2 and has not yet shipped on `v1`.", + "description": "GitHub Actions workflow that calls rtCamp/wp-shared-workflows ci-lint-css.yml. Runs Stylelint over changed files in a PR, or the whole project on push. Calls `@v1` by default.", "source": "template", "inputs": [ { "key": "wsw_ref", - "description": "Tag or ref of rtCamp/wp-shared-workflows to call. Workflow is in PR #2 at the time of writing; pin to `v1.0.0/task/ci-lint-workflows` or a commit SHA until the PR is merged.", - "default": "v1.0.0/task/ci-lint-workflows" + "description": "Tag or ref of rtCamp/wp-shared-workflows to call. Pin a major tag such as `v1`, never a branch: branches move or get deleted.", + "default": "v1" }, { "key": "node_version", - "description": "Node.js version.", - "default": "22" + "description": "Node.js version. Leave empty to use the project's .nvmrc, which the shared workflow reads.", + "default": "" } ], "files": [ diff --git a/node-packages/wp-tooling/scaffolds/ci/lint-css/templates/ci-lint-css.yml.mustache b/node-packages/wp-tooling/scaffolds/ci/lint-css/templates/ci-lint-css.yml.mustache index 4fe320f..36193f0 100644 --- a/node-packages/wp-tooling/scaffolds/ci/lint-css/templates/ci-lint-css.yml.mustache +++ b/node-packages/wp-tooling/scaffolds/ci/lint-css/templates/ci-lint-css.yml.mustache @@ -3,10 +3,6 @@ name: CI / Lint (CSS) # Scaffolded by @rtcamp/wp-tooling. # Calls the reusable ci-lint-css.yml from rtCamp/wp-shared-workflows. # -# EXPERIMENTAL: this reusable workflow is currently in rtCamp/wp-shared-workflows -# PR #2 and has not yet shipped on the `v1` tag. The `uses:` line below pins to -# the PR branch; switch to `@v1` (or a SHA) once the PR is merged. -# # Source: https://github.com/rtCamp/wp-shared-workflows/blob/{{wsw_ref}}/.github/workflows/ci-lint-css.yml on: @@ -22,6 +18,6 @@ permissions: jobs: lint-css: - uses: rtCamp/wp-shared-workflows/.github/workflows/ci-lint-css.yml@{{wsw_ref}} + uses: rtCamp/wp-shared-workflows/.github/workflows/ci-lint-css.yml@{{wsw_ref}}{{#node_version}} with: - node-version: "{{node_version}}" + node-version: "{{node_version}}"{{/node_version}} diff --git a/node-packages/wp-tooling/scaffolds/ci/lint-js/scaffold.json b/node-packages/wp-tooling/scaffolds/ci/lint-js/scaffold.json index eea78b9..a2bfbf6 100644 --- a/node-packages/wp-tooling/scaffolds/ci/lint-js/scaffold.json +++ b/node-packages/wp-tooling/scaffolds/ci/lint-js/scaffold.json @@ -2,18 +2,18 @@ "slug": "lint-js", "category": "ci", "name": "CI: Lint JS (ESLint)", - "description": "GitHub Actions workflow that calls rtCamp/wp-shared-workflows ci-lint-js.yml. Runs ESLint over changed files in a PR, or the whole project on push. Optionally validates package.json shape first. EXPERIMENTAL: the upstream workflow is currently in rtCamp/wp-shared-workflows PR #2 and has not yet shipped on `v1`.", + "description": "GitHub Actions workflow that calls rtCamp/wp-shared-workflows ci-lint-js.yml. Runs ESLint over changed files in a PR, or the whole project on push. Optionally validates package.json shape first. Calls `@v1` by default.", "source": "template", "inputs": [ { "key": "wsw_ref", - "description": "Tag or ref of rtCamp/wp-shared-workflows to call. Workflow is in PR #2 at the time of writing; pin to `v1.0.0/task/ci-lint-workflows` or a commit SHA until the PR is merged.", - "default": "v1.0.0/task/ci-lint-workflows" + "description": "Tag or ref of rtCamp/wp-shared-workflows to call. Pin a major tag such as `v1`, never a branch: branches move or get deleted.", + "default": "v1" }, { "key": "node_version", - "description": "Node.js version.", - "default": "22" + "description": "Node.js version. Leave empty to use the project's .nvmrc, which the shared workflow reads.", + "default": "" }, { "key": "validate_package_json", diff --git a/node-packages/wp-tooling/scaffolds/ci/lint-js/templates/ci-lint-js.yml.mustache b/node-packages/wp-tooling/scaffolds/ci/lint-js/templates/ci-lint-js.yml.mustache index ab697a9..6e59f82 100644 --- a/node-packages/wp-tooling/scaffolds/ci/lint-js/templates/ci-lint-js.yml.mustache +++ b/node-packages/wp-tooling/scaffolds/ci/lint-js/templates/ci-lint-js.yml.mustache @@ -3,10 +3,6 @@ name: CI / Lint (JS) # Scaffolded by @rtcamp/wp-tooling. # Calls the reusable ci-lint-js.yml from rtCamp/wp-shared-workflows. # -# EXPERIMENTAL: this reusable workflow is currently in rtCamp/wp-shared-workflows -# PR #2 and has not yet shipped on the `v1` tag. The `uses:` line below pins to -# the PR branch; switch to `@v1` (or a SHA) once the PR is merged. -# # Source: https://github.com/rtCamp/wp-shared-workflows/blob/{{wsw_ref}}/.github/workflows/ci-lint-js.yml on: @@ -23,6 +19,6 @@ permissions: jobs: lint-js: uses: rtCamp/wp-shared-workflows/.github/workflows/ci-lint-js.yml@{{wsw_ref}} - with: - node-version: "{{node_version}}" + with:{{#node_version}} + node-version: "{{node_version}}"{{/node_version}} validate-package-json: {{validate_package_json}} diff --git a/node-packages/wp-tooling/scaffolds/ci/lint-php/scaffold.json b/node-packages/wp-tooling/scaffolds/ci/lint-php/scaffold.json index a1eee0e..0848f64 100644 --- a/node-packages/wp-tooling/scaffolds/ci/lint-php/scaffold.json +++ b/node-packages/wp-tooling/scaffolds/ci/lint-php/scaffold.json @@ -2,13 +2,13 @@ "slug": "lint-php", "category": "ci", "name": "CI: Lint PHP (PHPCS + optional PHPStan)", - "description": "GitHub Actions workflow that calls rtCamp/wp-shared-workflows ci-lint-php.yml. Runs PHPCS (and optionally PHPStan) over changed files in a PR, or the whole project on push. EXPERIMENTAL: the upstream workflow is currently in rtCamp/wp-shared-workflows PR #2 and has not yet shipped on `v1`. Pin `wsw_ref` to the PR branch or a SHA until the PR merges.", + "description": "GitHub Actions workflow that calls rtCamp/wp-shared-workflows ci-lint-php.yml. Runs PHPCS (and optionally PHPStan) over changed files in a PR, or the whole project on push. Calls `@v1` by default.", "source": "template", "inputs": [ { "key": "wsw_ref", - "description": "Tag or ref of rtCamp/wp-shared-workflows to call. Workflow is in PR #2 at the time of writing; pin to `v1.0.0/task/ci-lint-workflows` or a commit SHA until the PR is merged into v1.", - "default": "v1.0.0/task/ci-lint-workflows" + "description": "Tag or ref of rtCamp/wp-shared-workflows to call. Pin a major tag such as `v1`, never a branch: branches move or get deleted.", + "default": "v1" }, { "key": "php_version", diff --git a/node-packages/wp-tooling/scaffolds/ci/lint-php/templates/ci-lint-php.yml.mustache b/node-packages/wp-tooling/scaffolds/ci/lint-php/templates/ci-lint-php.yml.mustache index 1498c8e..b6b5fc1 100644 --- a/node-packages/wp-tooling/scaffolds/ci/lint-php/templates/ci-lint-php.yml.mustache +++ b/node-packages/wp-tooling/scaffolds/ci/lint-php/templates/ci-lint-php.yml.mustache @@ -3,10 +3,6 @@ name: CI / Lint (PHP) # Scaffolded by @rtcamp/wp-tooling. # Calls the reusable ci-lint-php.yml from rtCamp/wp-shared-workflows. # -# EXPERIMENTAL: this reusable workflow is currently in rtCamp/wp-shared-workflows -# PR #2 and has not yet shipped on the `v1` tag. The `uses:` line below pins to -# the PR branch; switch to `@v1` (or a SHA) once the PR is merged. -# # Source: https://github.com/rtCamp/wp-shared-workflows/blob/{{wsw_ref}}/.github/workflows/ci-lint-php.yml on: diff --git a/node-packages/wp-tooling/scaffolds/ci/test-a11y/scaffold.json b/node-packages/wp-tooling/scaffolds/ci/test-a11y/scaffold.json index 9801979..e5e7f96 100644 --- a/node-packages/wp-tooling/scaffolds/ci/test-a11y/scaffold.json +++ b/node-packages/wp-tooling/scaffolds/ci/test-a11y/scaffold.json @@ -2,7 +2,7 @@ "slug": "test-a11y", "category": "ci", "name": "CI: Accessibility (pa11y)", - "description": "GitHub Actions workflow that calls rtCamp/wp-shared-workflows ci-test-a11y.yml. Runs pa11y-ci WCAG2AA scans against a wp-env-booted site. Stable (merged into release/v1.0.0).", + "description": "GitHub Actions workflow that calls rtCamp/wp-shared-workflows ci-test-a11y.yml. Runs pa11y-ci WCAG2AA scans against a wp-env-booted site. Calls `@v1` by default.", "source": "template", "inputs": [ { @@ -12,8 +12,8 @@ }, { "key": "node_version", - "description": "Node.js version.", - "default": "22" + "description": "Node.js version. Leave empty to use the project's .nvmrc, which the shared workflow reads.", + "default": "" } ], "files": [ diff --git a/node-packages/wp-tooling/scaffolds/ci/test-a11y/templates/ci-test-a11y.yml.mustache b/node-packages/wp-tooling/scaffolds/ci/test-a11y/templates/ci-test-a11y.yml.mustache index cfe72b0..f6274ca 100644 --- a/node-packages/wp-tooling/scaffolds/ci/test-a11y/templates/ci-test-a11y.yml.mustache +++ b/node-packages/wp-tooling/scaffolds/ci/test-a11y/templates/ci-test-a11y.yml.mustache @@ -19,6 +19,6 @@ permissions: jobs: test-a11y: - uses: rtCamp/wp-shared-workflows/.github/workflows/ci-test-a11y.yml@{{wsw_ref}} + uses: rtCamp/wp-shared-workflows/.github/workflows/ci-test-a11y.yml@{{wsw_ref}}{{#node_version}} with: - node-version: "{{node_version}}" + node-version: "{{node_version}}"{{/node_version}} diff --git a/node-packages/wp-tooling/scaffolds/ci/test-js/scaffold.json b/node-packages/wp-tooling/scaffolds/ci/test-js/scaffold.json index 3d6a672..c908d5c 100644 --- a/node-packages/wp-tooling/scaffolds/ci/test-js/scaffold.json +++ b/node-packages/wp-tooling/scaffolds/ci/test-js/scaffold.json @@ -2,7 +2,7 @@ "slug": "test-js", "category": "ci", "name": "CI: Jest", - "description": "GitHub Actions workflow that calls rtCamp/wp-shared-workflows ci-test-js.yml. Runs Jest with optional cache. Stable (merged into release/v1.0.0).", + "description": "GitHub Actions workflow that calls rtCamp/wp-shared-workflows ci-test-js.yml. Runs Jest with optional cache. Calls `@v1` by default.", "source": "template", "inputs": [ { @@ -12,8 +12,8 @@ }, { "key": "node_version", - "description": "Node.js version.", - "default": "22" + "description": "Node.js version. Leave empty to use the project's .nvmrc, which the shared workflow reads.", + "default": "" }, { "key": "enable_cache", diff --git a/node-packages/wp-tooling/scaffolds/ci/test-js/templates/ci-test-js.yml.mustache b/node-packages/wp-tooling/scaffolds/ci/test-js/templates/ci-test-js.yml.mustache index 0fc424e..adf2401 100644 --- a/node-packages/wp-tooling/scaffolds/ci/test-js/templates/ci-test-js.yml.mustache +++ b/node-packages/wp-tooling/scaffolds/ci/test-js/templates/ci-test-js.yml.mustache @@ -18,6 +18,6 @@ permissions: jobs: test-js: uses: rtCamp/wp-shared-workflows/.github/workflows/ci-test-js.yml@{{wsw_ref}} - with: - node-version: "{{node_version}}" + with:{{#node_version}} + node-version: "{{node_version}}"{{/node_version}} enable-cache: {{enable_cache}} diff --git a/node-packages/wp-tooling/scaffolds/ci/test-measure/scaffold.json b/node-packages/wp-tooling/scaffolds/ci/test-measure/scaffold.json index 5d68fa9..7d1a078 100644 --- a/node-packages/wp-tooling/scaffolds/ci/test-measure/scaffold.json +++ b/node-packages/wp-tooling/scaffolds/ci/test-measure/scaffold.json @@ -7,8 +7,8 @@ "inputs": [ { "key": "wsw_ref", - "description": "Git ref of rtCamp/wp-shared-workflows to pin (tag, branch, or SHA).", - "default": "release/v1.0.0" + "description": "Tag or ref of rtCamp/wp-shared-workflows to call. Pin a major tag such as `v1`, never a branch: branches move or get deleted.", + "default": "v1" }, { "key": "project_type", @@ -28,7 +28,7 @@ { "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\"]" + "default": "[\"6.7\", \"6.8\", \"6.9\", \"7.0\", \"7.1\"]" }, { "key": "test_php_exclude", diff --git a/node-packages/wp-tooling/scaffolds/ci/test-php/scaffold.json b/node-packages/wp-tooling/scaffolds/ci/test-php/scaffold.json index 48dc3f9..5ef3f37 100644 --- a/node-packages/wp-tooling/scaffolds/ci/test-php/scaffold.json +++ b/node-packages/wp-tooling/scaffolds/ci/test-php/scaffold.json @@ -2,7 +2,7 @@ "slug": "test-php", "category": "ci", "name": "CI: PHPUnit", - "description": "GitHub Actions workflow that calls rtCamp/wp-shared-workflows ci-test-php.yml. Runs PHPUnit with optional @wordpress/env for full integration tests. Stable (merged into release/v1.0.0).", + "description": "GitHub Actions workflow that calls rtCamp/wp-shared-workflows ci-test-php.yml. Runs PHPUnit with optional @wordpress/env for full integration tests. Calls `@v1` by default.", "source": "template", "inputs": [ { @@ -17,8 +17,8 @@ }, { "key": "node_version", - "description": "Node.js version (used only when use-wp-env is true).", - "default": "22" + "description": "Node.js version. Leave empty to use the project's .nvmrc, which the shared workflow reads.", + "default": "" }, { "key": "use_wp_env", diff --git a/node-packages/wp-tooling/scaffolds/ci/test-php/templates/ci-test-php.yml.mustache b/node-packages/wp-tooling/scaffolds/ci/test-php/templates/ci-test-php.yml.mustache index 80c0d06..a8440b5 100644 --- a/node-packages/wp-tooling/scaffolds/ci/test-php/templates/ci-test-php.yml.mustache +++ b/node-packages/wp-tooling/scaffolds/ci/test-php/templates/ci-test-php.yml.mustache @@ -19,6 +19,6 @@ jobs: test-php: uses: rtCamp/wp-shared-workflows/.github/workflows/ci-test-php.yml@{{wsw_ref}} with: - php-version: "{{php_version}}" - node-version: "{{node_version}}" + php-version: "{{php_version}}"{{#node_version}} + node-version: "{{node_version}}"{{/node_version}} use-wp-env: {{use_wp_env}}