check for file changes in CI
parent
590d359af6
commit
689763453e
10
test.sh
10
test.sh
|
@ -17,6 +17,7 @@
|
|||
set -eu -o pipefail
|
||||
|
||||
TESTSUITE="${TESTSUITE:-all}" # if env variable not set run all the tests
|
||||
CI="${CI:-false}" # if env variable not set don't run CI tests
|
||||
exitcode=0
|
||||
|
||||
if [[ "$TESTSUITE" = "lint" ]] || [[ "$TESTSUITE" = "all" ]] || [[ "$TESTSUITE" = "lintall" ]]
|
||||
|
@ -25,7 +26,14 @@ then
|
|||
make -s lint-ci && echo ok || ((exitcode += 4))
|
||||
echo "= go mod ================================================================"
|
||||
go mod download 2>&1 | grep -v "go: finding" || true
|
||||
go mod tidy -v && git diff --quiet && echo ok || (((exitcode += 2)) && echo ERROR: Please run go mod tidy)
|
||||
if [[ "$CI" = "true" ]]
|
||||
then
|
||||
go mod tidy -v && git diff --quiet go.* && echo ok || (((exitcode += 2)) && echo ERROR: Please run go mod tidy)
|
||||
echo "= generate docs ========================================================="
|
||||
make generate-docs > /dev/null 2>&1 && git diff --quiet site && echo ok || (((exitcode += 3)) && echo ERROR: Please run make generate docs)
|
||||
else
|
||||
go mod tidy -v && echo ok || ((exitcode += 2))
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue