Run Behat in throwaway containers when Docker is available
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Read #390 to see the worker design and #384 for the baseline timing. The repo likely needs a Dockerfile for a tuned PHP image without Xdebug, and changes to the test runner to launch throwaway containers per worker. Done when a draft PR runs CI jobs with containerized Behat and shows snapshot restore working. Fallback to regular runner must remain when Docker is absent.
由索引模型根据 Issue 内容生成。
描述
When Docker is available, a run could happen in throwaway containers, one per worker from #390. The container is not faster by itself: PHP ran at the same speed inside and outside of it in local tests. What it allows without root on the host is what makes the difference:
- the temporary directories and the database in memory, with no disk syncs;
- copy-on-write snapshots of the cached WordPress install instead of a full copy for every scenario (about 6 ms instead of about 90 ms to set up and tear down);
- a separate network per worker, so scenarios using fixed ports can run in parallel;
- a known toolchain, so every declared test requirement is present.
Starting a container takes about 0.3 to 0.5 seconds and every docker exec about 50 to 75 ms. Running the whole Behat process of a worker inside one container avoids that cost per command. The container's PHP version has to match the one the vendor folder was installed for.
Steps:
- Provide an image tuned for the test runs, without Xdebug unless coverage is requested.
- Run each worker of #390 in its own throwaway container, falling back to the regular runner when Docker is not available.
- Restore the cached WordPress install as a snapshot instead of a copy.
To reproduce a failure, it is enough to rerun that single scenario in a container that is kept.
Measuring: take the baseline from #384, then open a draft PR, run the same CI jobs against it and record both results here before we decide.
- 主要语言
- PHP
- 星标
- 42
- 派生
- 28
- 平均合并
- 18 小时 52 分钟
- 30 天内合并 PR
- 27
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
wp-cli/wp-cli-tests 的其他 Issue
-
scope:testing status:unconfirmed
难度 2/5 1-3 小时 新手友好度 65/100
wp-cli/wp-cli-tests#389 · 1 条评论 ·
维护者通常 1 天内回复
-
scope:testing
难度 4/5 3-5 天 新手友好度 25/100
wp-cli/wp-cli-tests#427 ·
维护者通常 1 天内回复
-
scope:testing
难度 4/5 3-5 天 新手友好度 22/100
wp-cli/wp-cli-tests#426 ·
维护者通常 1 天内回复
-
scope:testing
难度 4/5 3-5 天 新手友好度 25/100
wp-cli/wp-cli-tests#425 ·
维护者通常 1 天内回复
-
scope:testing
难度 5/5 一周以上 新手友好度 20/100
wp-cli/wp-cli-tests#395 ·
维护者通常 1 天内回复
查看 wp-cli/wp-cli-tests 的全部 Issue
相似的 Issue
-
fixed
难度 2/5 1-3 小时 新手友好度 62/100
firefly-iii/firefly-iii#13150 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
TYPO3-Solr/ext-solr#4828 ·
维护者通常 5 天内回复
-
sync-en
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
Перевод устарел
难度 2/5 1-3 小时 新手友好度 68/100
-
needs triage
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复