HomePhabricator
Diffusion Comm 6cccc466a2eb

[CI] Add identity pre-commit hook

Description

[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

Details

Provenance
jonAuthored on Sep 14 2022, 10:02 AM
Reviewer
atul
Differential Revision
D5135: [CI] Add identity pre-commit hook
Parents
rCOMM7304a3f53f39: [Nix Docs] Mention homebrew packages
Branches
Unknown
Tags
Unknown