mirror of
https://github.com/rancher/types.git
synced 2025-04-27 10:20:48 +00:00
18 lines
418 B
Bash
Executable File
18 lines
418 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
echo Running tests
|
|
|
|
PACKAGES=". $(find -name '*.go' | xargs -I{} dirname {} | cut -f2 -d/ | sort -u | grep -Ev '(^\.$|.git|.trash-cache|vendor|bin)' | sed -e 's!^!./!' -e 's!$!/...!')"
|
|
|
|
go test -cover -tags=test ${PACKAGES}
|
|
|
|
go generate
|
|
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
|
|
git status
|
|
echo git out of sync with generated code
|
|
exit 1
|
|
fi
|