Browser-laptop: remove unittest from pre-push hook

Created on 21 Sep 2017  路  9Comments  路  Source: brave/browser-laptop

i find that the unittest pre-push hook is more annoying than useful. ex:

  1. unittests are sometimes broken on master (such as right now) for reasons unrelated to my change, so i end up having to use --no-verify.
  2. pre-push hooks aren't run when merging via Github's UI so ultimately there is no guarantee that the unittests are passing
  3. unittests take a long time to run and should be checked after-push in Travis anyway
Qno-qa-needed dev-setup release-noteexclude suggestion

Most helpful comment

@bsclifton @bbondy https://github.com/brave/browser-laptop/pull/11084 already uses the env variable approach

All 9 comments

CC @bbondy

I would keep this, because I sometimes forgot to run unittest manually and this helps me out

If there was git push --unittest --lint that would be great for me.

@NejcZdovc i think #11084 probably wouldn't change things for you because you would still have the unittest pre-push hook in .git/hooks. however if you did a fresh clone, it would not have the hook by default.

This would be a good one to discuss in our weekly CI meetings (Friday)

I personally prefer having it even for merging on diff branches and pushing.
It doesn't take very long and --no-verify isn't hard to add when you don't need it.

unit tests and lint checks both have saved me several times from accidentally pushing things in the past

I do a lot of merging and testing with PRs and I definitely enjoy this feature (having tests run before push)

@diracdeltas what do you think about updating the push hook to not run if you have a specific environment variable defined, like NO_PUSH_HOOK_TESTS. If that's defined, we can just noop

env variable one way or the other seems like a good solution to this.

@bsclifton @bbondy https://github.com/brave/browser-laptop/pull/11084 already uses the env variable approach

Was this page helpful?
0 / 5 - 0 ratings

Related issues

luixxiul picture luixxiul  路  3Comments

bsclifton picture bsclifton  路  3Comments

jonathansampson picture jonathansampson  路  3Comments

jkup picture jkup  路  3Comments

lukemulks picture lukemulks  路  3Comments