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-commit
hook, however some tasks we want to run onlypre-push
. These would be time-consuming tasks such aspsalm
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 inpre-push
(~3m).The way I see this functioning is adding new config options as siblings to
tasks
,pre-commit
andpre-push
, each either their owntasks
sub-key.pre-commit.tasks
would execute identically totasks
in it's functionality (and either could be used, for backwards compatibility), the secondpre-push.tasks
would run when thegit: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 ofpre-commit
andpre-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?