second commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
cd /home/yanghao05/Workspace/gochat
|
||||
export GOPROXY=https://goproxy.cn,direct
|
||||
export GONOSUMCHECK=*
|
||||
export GONOSUMDB=*
|
||||
export GOFLAGS=-mod=mod
|
||||
|
||||
echo "=== Checking test compilation ==="
|
||||
FAILED=0
|
||||
PASSED=0
|
||||
|
||||
for dir in ./internal/model ./internal/auth ./internal/config ./pkg/testutil ./pkg/crypto ./internal/repository ./internal/pubsub ./internal/channel/provider ./internal/handler/api/v1 ./tests/e2e ./internal/service; do
|
||||
if [ -d "$dir" ]; then
|
||||
OUTPUT=$(go vet "$dir" 2>&1)
|
||||
if [ $? -eq 0 ] && [ -z "$OUTPUT" ]; then
|
||||
echo "PASS: $dir"
|
||||
PASSED=$((PASSED+1))
|
||||
else
|
||||
echo "FAIL: $dir"
|
||||
echo "$OUTPUT" | head -5
|
||||
FAILED=$((FAILED+1))
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "=== Summary: $PASSED passed, $FAILED failed ==="
|
||||
echo ""
|
||||
echo "=== Running testable packages ==="
|
||||
go test -v -count=1 ./internal/model/ ./internal/auth/ ./internal/config/ ./pkg/testutil/ ./pkg/crypto/ ./internal/repository/ ./internal/pubsub/ 2>&1 | tail -30
|
||||
Reference in New Issue
Block a user