I'm trying to replicate Gated check-in functionality in Visual Studio + VSO + Git.
Actually I'd like to run Unit Tests before code will be committed to local repo OR pushed to remote.
But faced with an issue - there is no Gated check-in functionality in VSO + GIT.
I've tried to configure git hooks - pre-commit hook will work for me - but Visual Studio GIT provider doesn't support Git hooks! Its due to the libgit2 -it is used in Visual Studio and it doesn't support hooks:(
So my question is how can I run NUnit Tests automatically before commit in Visual Studio 2013 + VSO +Git and do not allow bad code get into my repo?
Thanks!
Gated checkin, or the equivalent has already been added to VSO. If you go to the properties of your Git repo in Admin you should see an additional settings tab when you select a branch.
Check the box to enable build before merge for your MASTER branch and select the build you want to use to validate.
https://www.visualstudio.com/en-us/news/2015-may-15-vso.aspx
Developers then have to create a pull request to MASTER and pass the gate to get in.
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