Skip to content

Implement GitHub workflow to have a basic test for standalone plugins #639

@felixarntz

Description

@felixarntz

Feature Description

Follow up to #635: As we are publishing certain modules as standalone plugins, it is vital that we ensure the plugins work as expected. This issue's goal is to provide at least a foundation for some automated testing of the individual plugins: It should run the build step from #635 and then load the plugin in e.g. a customized PHPUnit configuration, to just ensure that there is no fatal error when loading the plugin. While this is far from a comprehensive solution, the code itself is already covered by the unit tests on the module, and having this extra check is the most critical and minimum starting point to ensure we don't accidentally use anything from the Performance Lab core in a module that wouldn't work when it's standalone.

This should already be the case per our writing a module guidelines, but having a CI workflow to ensure that will be crucial to ensure we don't let any mistake accidentally slip through.

Requirements

  • Implement a new GitHub workflow that runs the build-plugins command from Implement CLI command to for a build process to transform modules into standalone plugins #635 and then loads each individual built plugin in a sandboxed PHP environment.
    • For example, it could load the WordPress unit test suite and force those plugins to be active, just to ensure no fatal error occurs.
  • This workflow should probably run only on push events to trunk, not for every pull request, to avoid the overhead of having this on every PR. Running this on every trunk push is sufficient to capture failures before they would accidentally get released to end users.
    • Additionally, only modules that have seen changes since the last push should be covered by this test, since for unchanged modules it would be redundant and just slow down CI unnecessarily.

Metadata

Metadata

Assignees

Labels

InfrastructureIssues for the overall performance plugin infrastructure[Plugin] Performance LabIssue relates to work in the Performance Lab Plugin only[Type] EnhancementA suggestion for improvement of an existing feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions