<commit_before>#!/bin/bash

set -e

toolsgopath=${GOPATH/:*/}
cd "$toolsgopath/src/github.com/casualjim/go-swagger"

godep go test -race ./...
GOPATH=`godep path:$GOPATH` "$toolsgopath/bin/goveralls" -service=circle-ci
# # Run test coverage on each subdirectories and merge the coverage profile.
# echo "mode: count" > profile.cov
#
# # Standard go tooling behavior is to ignore dirs with leading underscores
# for dir in $(find . -maxdepth 10 -not -path './.git*' -not -path '*/_*' -type d -not -path 'Godeps' -not -path './examples*' -not -path './fixtures*')
# do
# if ls $dir/*.go &> /dev/null; then
#     godep go test -covermode=count -coverprofile=$dir/profile.tmp $dir
#     if [ -f $dir/profile.tmp ]
#     then
#         cat $dir/profile.tmp | tail -n +2 >> profile.cov
#         rm $dir/profile.tmp
#     fi
# fi
# done
#
# godep go tool cover -func profile.cov

# To submit the test coverage result to coveralls.io,
# use goveralls (https://github.com/mattn/goveralls)
# goveralls -coverprofile="profile.cov" -service="circle-ci" -repotoken="$COVERALLS_TOKEN"<commit_msg>also save coverage.sh<commit_after>#!/bin/bash

set -e

cd "${GOPATH/:*/}src/github.com/casualjim/go-swagger"

godep go test -race ./...
GOPATH=`godep path:$GOPATH` goveralls -service=circle-ci -repotoken=$COVERALLS_TOKEN
{'fraction_non_alphanumeric': 0.1633435582822086, 'fraction_numerical': 0.0023006134969325155, 'mean_word_length': 3.5, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7165199', 'n_tokens_mistral': 492, 'n_tokens_neox': 473, 'n_words': 125}