Skip to content

[Finding] Quality workflow should use Docker containers instead of host PHP #11

@rubenvdlinde

Description

@rubenvdlinde

Finding

The quality workflow (quality.yml) uses shivammathur/setup-php@v2 to install PHP directly on the GitHub Actions runner. This means:

  • PHP version depends on the runner, not the project config
  • Extensions installed globally, not isolated
  • Can't easily test multiple PHP versions in parallel on the same runner
  • Doesn't match how apps run in production (Docker/container-based)

Recommendation

Use a Docker container (e.g. php:8.3-cli) for PHPUnit and Newman stages, similar to what Hydra's run-quality.sh does. The static analysis tools (PHPCS, Psalm, PHPStan) can continue running on the host since they don't need a full Nextcloud environment.

Context

Discovered while building Hydra's automated quality testing stage. Running tests inside a container ensures PHP version consistency and enables parallel test runs.


Created from Hydra pipeline development.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions