add CI/CD, not finish

v4
vinllen 5 years ago
parent e711f3090f
commit d88edb24db
  1. 8
      src/redis-shake/common/utils_test.go
  2. 3
      src/redis-shake/filter/filter_test.go
  3. 23
      test/test.sh

File diff suppressed because one or more lines are too long

@ -1,3 +1,6 @@
// +build linux darwin windows
// +build integration
package filter
import (

@ -0,0 +1,23 @@
#!/bin/bash
if [ "Linux" != "$(uname -s)" ];then
echo "only support Linux"
exit -1
fi
set -o errexit
# run unit test
curPath=$(cd "$(dirname "$0")"; pwd)
export GOPATH=$curPath/..
cd $curPath/../src/redis-shake
go test -tags integration ./...
if [ $? -ne 0 ]; then
echo "run ut failed"
else
echo "run ut successfully"
fi
# run integration test
cd $curPath
Loading…
Cancel
Save