old_console/cicd/go_test.sh
2024-11-02 14:12:45 +03:00

11 lines
No EOL
225 B
Bash

#!/bin/bash
set -e # fail on any error
PKG=$(cat go.mod | grep module | awk '{print $2}')
PKG_LIST=$(go list ${PKG}/... )
for CUR_PKG in $PKG_LIST
do
go test -timeout 30s -coverprofile=/tmp/go-code-cover $CUR_PKG
done