A dot net core pre push checks hook
This is a git pre push script for dot net core to check your push isn't going to break the build and will pass all unit tests.
You need to place this is your git repo folder in /.git/hooks/, this is a hidden folder so you will have to turn on "show hidden folders" or cd into the dir in terminal. E.g. cd /.git/hooks inside of your local repo folder.
All you should need to change is on line 32, "cd test", change this to to the root folder of your test project. e.g. cd test/MyTestProject.
Everything is automated, and will run on every "git push" command. Git knows to look in the .git/hooks folder and as long as the file is named "pre-push" then all will work.
If the pre-push fails, then you will get a red terminal message of:
If the pre-push all passes, then you will get a green terminal message of:
Your push will also be pushed to your git repo.
These are some things I have came across while running this pre-push.