Skip to content

Commit

Permalink
test: Add codecov.io integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Thor-x86 committed Nov 17, 2020
1 parent 9f113cf commit 6787d14
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@

# Generated file at Windows XP
Thumbs.db
**/Thumbs.db
**/Thumbs.db

# Coverage logs
coverage.txt
profile.out
8 changes: 7 additions & 1 deletion test_all.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
#!/bin/bash -e

rm -f coverage.txt

dialects=("postgres" "postgres_simple" "mysql" "mysql-legacy" "mariadb" "sqlite") # "mssql")

for dialect in "${dialects[@]}" ; do
if [ "$GORM_DIALECT" = "" ] || [ "$GORM_DIALECT" = "${dialect}" ]
then
GORM_DIALECT=${dialect} go test --tags "json1"
GORM_DIALECT=${dialect} go test -coverprofile=profile.out -covermode=atomic $d
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
fi
fi
done

0 comments on commit 6787d14

Please sign in to comment.