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.
Finding
The quality workflow (
quality.yml) usesshivammathur/setup-php@v2to install PHP directly on the GitHub Actions runner. This means:Recommendation
Use a Docker container (e.g.
php:8.3-cli) for PHPUnit and Newman stages, similar to what Hydra'srun-quality.shdoes. 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.