github.com/ronaksoft/rony@v0.16.26-0.20230807065236-1743dbfe6959/gotest.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  go version
     4  
     5  packages=$(go list -mod vendor ./...);
     6  
     7  
     8  for pkg in ${packages}; do
     9    skipTest=false;
    10    if [[ ${skipTest} = false ]]; then
    11      x=$(go test -mod=vendor -v "$pkg");
    12      # shellcheck disable=SC2181
    13      if [ ! "${x}" ]; then
    14        echo "\033[0m${x}";
    15        exit 1
    16      fi
    17      echo "\033[0;37m${pkg} \033[0;32mPASSED!.";
    18    fi
    19  done