[CI] Add identity pre-commit hook
Summary:
Force the identity test suite to run as a pre-commit hook when editing
files from that directory.
This can take ~1s for a dirty repository, up to ~40s for a clean build.
bash -c had to be used, because it looks like they fork + exec the command, which means that you need a valid interpreter as the command. cd is just a shell builtin and only exists in the context of an interpreter shell.
https://linear.app/comm/issue/ENG-1813
Test Plan:
# change a file in services/identity git add . git commit -m "test" # assert that hook is ran
Reviewers: atul, varun, abosh
Reviewed By: atul, varun
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D5135