mirror of
https://github.com/OMGeeky/tarpc.git
synced 2025-12-28 15:22:30 +01:00
- Move them back to the root directory of the repo - Explicitly specify the path to the manifest we are running tests for
31 lines
536 B
Bash
Executable File
31 lines
536 B
Bash
Executable File
#!/bin/sh
|
|
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
NC='\033[0m' # No Color
|
|
|
|
git diff --exit-code &>/dev/null
|
|
if [ "$?" != 0 ];
|
|
then
|
|
echo ${RED}ERROR${NC} You have uncommitted changes please commit or stash them before pushing so that I can run tests!
|
|
exit 1
|
|
fi
|
|
|
|
TEST_RESULT=0
|
|
cargo test --manifest-path tarpc/Cargo.toml &>/dev/null
|
|
if [ "$?" != "0" ];
|
|
then
|
|
echo ${RED}FAIL${NC} pre-push test check
|
|
TEST_RESULT=1
|
|
else
|
|
echo ${GREEN}PASS${NC} pre-push test check
|
|
fi
|
|
|
|
RESULT=0
|
|
if [ "$TEST_RESULT" == "1" ];
|
|
then
|
|
RESULT=1
|
|
fi
|
|
|
|
exit $RESULT
|