Skip to content

Build/Test Tools: Reference the smoke check action from trunk. - #13389

Draft
adimoldovan wants to merge 3 commits into
WordPress:trunkfrom
adimoldovan:66036-smoke-check-trunk-ref
Draft

Build/Test Tools: Reference the smoke check action from trunk.#13389
adimoldovan wants to merge 3 commits into
WordPress:trunkfrom
adimoldovan:66036-smoke-check-trunk-ref

Conversation

@adimoldovan

@adimoldovan adimoldovan commented Sep 3, 2026

Copy link
Copy Markdown

Points the smoke check step at the action on trunk, and drops the checkout that the relative reference needed.

Trac ticket: https://core.trac.wordpress.org/ticket/66036

Depends on #13388. Land that first: until the action is on trunk, @trunk does not resolve, and the runner resolves every uses: during job setup.

The 6.9, 7.0 and 7.1 branches call reusable-upgrade-testing.yml@trunk. Trunk's reusable workflow then runs with github.ref set to the release branch, where .github/actions does not exist, so a relative reference fails on every release branch job. Pointing at the action on trunk also matches how those branches already take their CI from trunk.

The path filters for .github/actions/smoke-check/** now cover pushes only. A pull request resolves the action from trunk rather than from the branch, so a pull request run would report on the old script.

Code scanning

This adds two unpinned-uses alerts, one for each reference, requiring a hash pin, but it does not fit here:

  • The action lives in this repository. Anyone who can change it on trunk can also edit the workflow file, including a pinned SHA.
  • The reference always resolves from WordPress/wordpress-develop at trunk, never from a fork, so a pull request cannot inject action code.
  • A pin would freeze the release branches on a stale script and need a bump on every change to it.

WordPress/props-bot-action@trunk in props-bot.yml carries the same alert today.

Testing instructions

Once #13388 is on trunk, the Installation Tests and Upgrade Tests checks here resolve the action from trunk and run it. Each single site row prints seven ok lines; multisite rows skip the step.

Before that, both workflows fail at job setup with Unable to resolve action. That is expected, and it is the reason for the two pull requests.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: The workflow changes and iterative code review. I reviewed and tested the result.

…s site.

The action serves an installed single site with PHP's built-in web server. It
checks the front end, REST API, database upgrade page, 404 handling, login,
dashboard, and server log. The script lives in `smoke-check.sh`, which reads as
a bash file instead of a 100-line inline `run:` block.

actionlint shellchecks inline `run:` blocks, but it does not read composite
actions. The workflow linter now runs shellcheck over the scripts under
`.github/actions`, and it triggers on changes to that directory.
Upgrade testing calls the action instead of carrying the script inline.
Installation testing runs the same check after it installs a site. Both skip
multisite, because a network keeps its domain in wp-config.php and the
database, not in an option the script can move to a temporary port.

The jobs check the action out into `ci-tools` with a sparse checkout, and call
it by relative path. Each run then uses the script from the branch under test.
A follow-up changes the reference to `@trunk`, which the release branches need,
and drops the checkout.

Installation testing also gets a longer timeout for the added step.
The release branches call `reusable-upgrade-testing.yml@trunk`. Trunk's
reusable workflow then runs with `github.ref` set to the release branch, where
`.github/actions` does not exist, so a relative reference fails there. The
workflows point at the action on trunk instead, and drop the checkout.

A pull request now resolves the action from trunk rather than from the branch,
so the path filters for the action cover pushes only.
- name: Post-install smoke check
# A network's domain lives in wp-config.php and the database, not just an option.
if: ${{ ! matrix.multisite }}
uses: WordPress/wordpress-develop/.github/actions/smoke-check@trunk
echo 'ok server log'
env:
SITE_PORT: 8889
uses: WordPress/wordpress-develop/.github/actions/smoke-check@trunk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants