/
nekstep
/
gvcli
Обзор
Документация
Войти
/
nekstep
/
gvcli
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test
38 строк
981 B
Oleg Chirukhin
feat(api): use generated code, fix tests
18 июл 2025, 02:15
18 июл 2025, 02:15
f3547c6
Код
Авторство
О чём код?
#!/usr/bin/env bash # Run all Go tests with richgo, installing it if necessary set -e # Change to the project root directory (where this script is located) cd "$(dirname "$0")" echo "Running all Go tests..." # Add Go bin to PATH for this session (always, before checking) export PATH="$PATH:$(go env GOPATH)/bin" # Check if richgo binary is installed if ! command -v richgo >/dev/null 2>&1; then echo "richgo not found, installing..." go install github.com/kyoh86/richgo@latest fi # Ensure richgo is in go.mod (optional, but keeps dependencies tidy) if ! grep -q 'github.com/kyoh86/richgo' go.mod; then echo "Adding richgo to go.mod..." go get github.com/kyoh86/richgo@latest fi # Run tests with richgo (disable caching with -count=1) # For running with caching, use: richgo test ./... richgo test -count=1 ./... status=$? if [ $status -eq 0 ]; then echo "All tests passed." else echo "Some tests failed." fi exit $status