Skip to content
This repository was archived by the owner on Jul 28, 2024. It is now read-only.
This repository was archived by the owner on Jul 28, 2024. It is now read-only.

Improve Dockerized testing infrastructure #1389

@borekb

Description

@borekb

Full tests (npm run tests:full) currently take over an hour to run on a relatively powerful machine (Core i7 MacBook Pro) and there are some other issues related to tests as we reviewed them with @JanVoracek today.

UPDATE: In the end, this issue is a major update of the dockerized dev / testing environment last updated in #1329.

Highlights

During the work, I've also encountered several other things that are noted in the "Deferred items" section below.

TODO list

Deferred items

These should be done separately in future PRs.

  • Rename images to something like versionpress/wordpress and versionpress/cli, i.e., make "CLI" part of the image name so that it's clear when digests are used.
  • Only enable Xdebug for ...:debug scripts.
    • Right now, it's always enabled and just not configured with the right idekey in non-debug scripts which makes things slower. Here and here.
    • Update Xdebug to 2.7.0. (Let's still stay on PHP 7.2 for tests for now.)
  • Make PHP 7.2 the minimum required version? (We don't have an issue for it yet, will create it.)
  • The WP-CLI installation into the WP image looks a bit weird, review it.
  • Try updating PHPUnit (I remember it wasn't so easy due to supported PHP versions or something but it's worth looking again).
  • Don't base our CLI image on wordpress:cli, it does a lot more than we need.
  • Explore re-running failed tests: Implement "previous failures first" mode sebastianbergmann/phpunit#46
  • Close Fix remaining tests under Docker, post-beta #1284 (Fix remaining tests under Docker, post-beta) and port those to a new issue
  • Review backlog from the "Noted for future work" section in Dev setup updates – spring 2018 #1329
  • Another big one is WP-CLI / Selenium worker switching – revised approach #1258 (WP-CLI / Selenium worker switching). That issue is a bit old but overall, we should still be able to run all tests with both workers, or pick a worker with a flag like npm run tests --worker=selenium. Things like a worker or a specific test site to use shouldn't be hardcoded in test-config.yml.

Metadata

Metadata

Assignees

Labels

noteworthySignificant issue or PR, to be highlighted in release notesscope: dev-infrastructureBuild scripts, IDE settings, CI, Docker dev stack, testing, tooling, etc.scope: testsTesting code. For infrastructure (CI, etc.), use "dev-infrastructure".

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions