Created
June 16, 2020 20:27
-
-
Save BryanMoslo/98f32a1d1976f65b4e388c3866674f17 to your computer and use it in GitHub Desktop.
This bash funtion checks if buffy tests, go linter and js tests pass before push the current branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
push(){ | |
if ! buffalo test ./... ; then | |
echo "Dude, your tests are failing, I can not push this branch" | |
return | |
fi | |
if ! golangci-lint run -v ; then | |
echo "Dude, your golangci linter is failing, I can not push this branch" | |
return | |
fi | |
if ! yarn run jest assets/js/*.test.js ; then | |
echo "Dude, your javascript tests are failing, I can not push this branch" | |
return | |
fi | |
git push origin HEAD | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment