github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/test/pre-push (about) 1 #!/bin/sh 2 3 # To install: 4 # ln -sv $GOPATH/src/github.com/lmorg/murex/test/pre-push .git/hooks/ 5 6 cd $GOPATH/src/github.com/lmorg/murex 7 8 trap ctrl_c INT 9 10 ctrl_c() { 11 printf "\n\033[0;31m[PUSH CANCELLED]\033[0m\n" 12 exit 1 13 } 14 15 set -e 16 17 echo "Running golang unit tests...." 18 mkdir -p ./test/tmp 19 go test ./... -race 20 21 echo "Running murex behavioural tests...." 22 go build github.com/lmorg/murex 23 ./murex -c 'g behavioural/*.mx -> foreach f { source $f }; test run *' 24 25 echo "Allowing git push to proceed...."