Is there a service that offers this functionality:
When pushing to GitHub, it runs all RSpec and Jasmine tests. If any test fails, it rejects the push.
pre-push hook is passed local and remote IDs. To run tests on every commit run a loop over git rev-list <remote-id>.. <local-id> . In the loop checkout every commit into a temporary directory, run tests and remove the directory.
Open a terminal window by using option + T in GitKraken Client. Once the terminal windows is open, change directory to . git/hooks . Then use the command chmod +x pre-commit to make the pre-commit file executable.
Rejecting pushes can be done by githooks. A hook is typically just a script which exits with status 0 or 1. Depending on that result the action is allowed or disallowed.
See man githooks
for a list of available hooks and how they work.
Also github seems to allow you to configure your hooks: http://developer.github.com/v3/repos/hooks/
Have a look at the Gerrit/Jenkins combination. We use it to build our C++ code before it gets pushed to the real branch. You can also set it up to run tests before pushing it to the real branch. I think you can also set it up to use Github.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With