forked from bp-alex/ibconnect
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtests
More file actions
executable file
·31 lines (24 loc) · 692 Bytes
/
tests
File metadata and controls
executable file
·31 lines (24 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
export DB_URL
while goose -env db down; do
sleep 0.1
done
goose -env db up
if [ $? -ne 0 ]; then
exit 1
fi
mkdir -p cover
# coverage ignores test use from other packages, but that's OK
go test -covermode=count -coverprofile=cover/core.cover ./core && \
go test -covermode=count -coverprofile=cover/gateway.cover ./gateway && \
go test -covermode=count -coverprofile=cover/server.cover ./server
if [ $? -ne 0 ]; then
exit 1
fi
echo "mode: count">all.cover
grep -h -v "mode: count" cover/*.cover >> all.cover
if [ "$CI" == "true" ]; then
exit 0
fi
go tool cover -func=all.cover|sort -rnk 3|sed 's/.*\/ibconnect\///g'|sed 's/\t/ /g'
go tool cover -html=all.cover