| Q |
A |
| Version |
GrumPHP 1.5.0 |
| Bug? |
no |
| New feature? |
yes |
| Question? |
no |
| Documentation? |
no |
| Related tickets |
n/a |
Currently GrumPHP supports being run as a pre-commit hook, however some tasks we want to run only pre-push. These would be time-consuming tasks such as psalm or running our test suite.
In our case, we want to run our test suite on bare metal in pre-commit (~20s), but in Docker in pre-push (~3m).
The way I see this functioning is adding new config options as siblings to tasks, pre-commit and pre-push, each either their own tasks sub-key. pre-commit.tasks would execute identically to tasks in it's functionality (and either could be used, for backwards compatibility), the second pre-push.tasks would run when the git:pre-push command is run.
You would also need to allow the other siblings of tasks (e.g. git_hook_variables, process_timeout, fixer, parallel etc.) as children of pre-commit and pre-push.
I understand this is a large change, and I'm happy to try and spend some time on implementing it if there's interest?
Currently GrumPHP supports being run as a
pre-commithook, however some tasks we want to run onlypre-push. These would be time-consuming tasks such aspsalmor running our test suite.In our case, we want to run our test suite on bare metal in
pre-commit(~20s), but in Docker inpre-push(~3m).The way I see this functioning is adding new config options as siblings to
tasks,pre-commitandpre-push, each either their owntaskssub-key.pre-commit.taskswould execute identically totasksin it's functionality (and either could be used, for backwards compatibility), the secondpre-push.taskswould run when thegit:pre-pushcommand is run.You would also need to allow the other siblings of
tasks(e.g.git_hook_variables,process_timeout,fixer,paralleletc.) as children ofpre-commitandpre-push.I understand this is a large change, and I'm happy to try and spend some time on implementing it if there's interest?