mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
Move test files to testdata dir
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -2,4 +2,7 @@ config.json
|
||||
config.dat
|
||||
node_modules
|
||||
lib
|
||||
.vscode
|
||||
.vscode
|
||||
|
||||
testdata/dump
|
||||
testdata/writefiletest
|
||||
@@ -8,7 +8,7 @@ before_install:
|
||||
- go get -t -v ./...
|
||||
|
||||
script:
|
||||
- ./test.sh
|
||||
- ./testdata/test.sh
|
||||
|
||||
install:
|
||||
- go get github.com/gorilla/websocket
|
||||
|
||||
0
coverage.txt → testdata/coverage.txt
vendored
0
coverage.txt → testdata/coverage.txt
vendored
11
test.sh → testdata/test.sh
vendored
11
test.sh → testdata/test.sh
vendored
@@ -1,12 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
echo "" > coverage.txt
|
||||
|
||||
if [ -n "$TRAVIS_BUILD_DIR" ]; then
|
||||
cd $TRAVIS_BUILD_DIR
|
||||
else
|
||||
cd $GOPATH/src/github.com/thrasher-/gocryptotrader
|
||||
fi
|
||||
|
||||
echo "" > testdata/coverage.txt
|
||||
|
||||
for d in $(go list ./... | grep -v vendor); do
|
||||
go test -race -coverprofile=profile.out -covermode=atomic -cover $d
|
||||
if [ -f profile.out ]; then
|
||||
cat profile.out >> coverage.txt
|
||||
cat profile.out >> testdata/coverage.txt
|
||||
rm profile.out
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user