Skip to content

Add Docker setup and container CI workflow for the test runner - #344

Merged
mindctrl merged 7 commits into
WordPress:masterfrom
dhruvang21:feat/274-containerization
Oct 23, 2026
Merged

mindctrl merged 7 commits into
WordPress:masterfrom
dhruvang21:feat/274-containerization

Conversation

@dhruvang21

@dhruvang21 dhruvang21 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Description

Run prepare, test, report, and cleanup in a container against a throwaway MySQL/MariaDB database. Save each step's log, junit.xml, env.json, and a Markdown summary to output/. See #274 (comment).

How bot report works: when Container Tests finishes for a PR, the bot downloads the results artifacts, combines each job's summary into one comment, and posts it on the PR. Later pushes update that same comment instead of adding new ones. If a run fails before uploading anything (for example, the image fails to build), the comment says so and links to the run. Cancelled runs are skipped.

Security

  • It runs from the base repository, so it can comment on PRs from forks, but it never checks out or runs PR code. The artifacts are only read as text.
  • It finds the PR from the run's commit and source repository, not from anything in the artifacts, so a PR can't redirect the comment to another PR.
  • It only edits its own bot comment. A user comment that copies its hidden marker is ignored.
  • @ mentions in the summaries are neutralized so nobody gets pinged, and the comment is trimmed to stay under GitHub's size limit.

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @mindctrl, @jazzsequence.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: mindctrl, jazzsequence.

Co-authored-by: dhruvang21 <dhruvang21@git.wordpress.org>
Co-authored-by: kittenkamala <amykamala@git.wordpress.org>
Co-authored-by: ekamran <ekamran@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@ekamran ekamran left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dhruvang21, this works well. I checked the CI results (25,956 tests on both jobs), ran the full compose setup on macOS arm64 (25,976 tests, 0 failures), and tried a database that never comes up and a failing prepare. Both stop with the right summary and exit code. The report workflow cannot run before merge, so I ran its script against mocks: it updates only its own comment, ignores a copied marker, neutralises mentions, skips symlinks, and finds the PR only from the run.

Small one, not blocking: line 13 of compose.yaml says any WPT_* variable can be passed through, but only the listed ones are. The README already says it right.

Comment thread .github/workflows/container-tests.yml Outdated
Comment thread docker/entrypoint.sh Outdated
@dhruvang21
dhruvang21 requested a review from mindctrl October 16, 2026 05:11

@ekamran ekamran left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked at bd841e0: the concurrency group now uses the PR number, and the compose healthcheck replaces the entrypoint wait. Locally the db service became healthy on mariadb:11.4 (through the mariadb-admin fallback), mariadb:10.6, mysql:8.4 and mysql:5.7 (amd64), and the container runs in CI pass on MySQL 8.4 and MariaDB 10.6. Thanks @dhruvang21.

@mindctrl
mindctrl merged commit e99b25a into WordPress:master Oct 23, 2026
9 checks passed
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.

5 participants