sjansen/mecha

View on GitHub
scripts/run-all-tests

Summary

Maintainability
Test Coverage
#!/bin/sh
set -e

DIRS=`go list ./... | grep -v /spikes/`

echo ========================================
go version
echo ========================================
printenv | sort
echo ========================================
mkdir -p dist
go test -coverpkg .,./internal/... -coverprofile=dist/coverage.txt -tags integration ./...
echo ========================================
echo go vet...
go vet  ./...
echo ========================================
echo golangci-lint...
golangci-lint run
echo ========================================
echo gofmt...
UNFORMATTED=`gofmt -l .`
if [ -n "$UNFORMATTED" ]; then
    printf "gofmt needed:\n--------------------\n"
    printf "$UNFORMATTED"
    echo   # blank line
    exit 1
fi