localgovdrupal / localgov_shared_workflows

GNU General Public License v2.0
0 stars 0 forks source link

Add option to switch workflow to phpunit? #9

Open finnlewis opened 3 months ago

finnlewis commented 3 months ago

Sometimes tests fail and paratest does not tell us what the failure is.

@stephen-cox has this PR to work around on the localgov_project

https://github.com/localgovdrupal/localgov_project/pull/161/files

Might we include something in the shared workflows to allow us to switch to phpunit if we have problems seeing the test failures?

Case in point: https://github.com/localgovdrupal/localgov_alert_banner/actions/runs/10343333342/job/28704570650

millnut commented 3 months ago

Hey @finnlewis sorry for the delay I've been on holiday. I guess there are a few options:

  1. We update shared workflows to only use phpunit and keep the project on paratest, this way we get the correct result on the module repo level but get the speed advantage on the project level
  2. We switch everything to phpunit and the project tests will be slower to run in favour of better readability
  3. We add an env var to the repo (ENABLE_PHPUNIT - true/false) and if true it switches it to use PHPUnit however this will require a user to have repository setting permissions to toggle this on/off

Would be interesting to hear others' thoughts on this.

millnut commented 2 months ago

This can be closed once https://github.com/localgovdrupal/localgov_shared_workflows/pull/14 is merged