Replicate Gated Logging Functions in Visual Studio + VSO + Git

I am trying to replicate a Ged check-in in Visual Studio + VSO + Git.

In fact, I would like to run Unit Tests before the code is bound to a local repo or clicked on a remote one.

But I ran into a problem - in VSO + Git there is no Gated check-in function.

I tried setting up git hooks - the pre-commit hook will work for me, but the Visual Studio git provider does not support git hooks! Thanks to libgit2 -it, it is used in Visual Studio and does not support hooks :(

So my question is, how can I automatically run NUnit tests before committing in Visual Studio 2013 + VSO + Git and not allow the loading of bad code into my repo?

Thanks!

+7
git visual-studio nunit githooks vsts
source share
2 answers

Closed validation, or equivalent is already added to VSO. If you go to the properties of your Git repository in Admin, you should see the advanced settings tab when choosing a branch.

Check the box to enable the assembly before merging for the MASTER branch and select the assembly that you want to use for verification.

https://www.visualstudio.com/en-us/news/2015-may-15-vso.aspx

Then, developers need to create a move request to MASTER and pass the gate to enter.

+4
source share

The best way to do this is perhaps to use the traction request function and merge only those branches where the unit tests pass. You can combine them successfully.

Another possibility is to use the script as git -build, which will help you execute the command (assembly and testing) locally before clicking ... See here for an explanation and here for a later script (sorry for the French ...)

0
source share

All Articles