moodle-plugin-ci
moodle-plugin-ci copied to clipboard
Allow to skip moodle installation
We separate the checks into three different stages:
- phpunit
- behat
- everything else
when all we need is phpunit or behat we don't need to install moodle in cli. Currenlty it only takes extra time: install moodle, install moodle again for phpunit, run phpunit.
phpdoc also needs a cli installation of Moodle.
But if you are in a hurry and can live without phpunit - behat - grunt - phpdoc, one can already have results in less than a minute (40 secs is my fastest run now, based on this workflow script)
There is some analogy with #36. I suggest to make cli moodle installation triggered from the test step itself, i.e.
- Each test command class has a flag indicating that full moodle installation is required
- When we reach the first test with this flag, we check if moodle has been installed, if not - installation will be performed prior to test itself.
moodle-plugin-ci installwill do everything it does now apart of cli moodle installation. We can add anmoodle-plugin-ci installcommand param to force moodle install (e.g.--install-moodle) at this stage just for the case if someone runs something custom in following steps, if all test steps are usingmoodle-plugin-ci ...this param should not be used.