github.com/mariuspot/gqlgen@v0.7.2/.circleci/test.sh (about)

     1  #!/bin/bash
     2  
     3  set -eu
     4  
     5  echo "### go code formatting"
     6  go fmt ./...
     7  
     8  echo "### go generating"
     9  go generate ./...
    10  
    11  if [[ $(git --no-pager diff) ]] ; then
    12      echo "you need to run `go fmt` or `go generate`"
    13      git --no-pager diff
    14      exit 1
    15  fi
    16  
    17  echo "### running testsuite"
    18  go test -race ./...
    19  
    20  echo "### linting"
    21  gometalinter --vendor ./...