Merge pull request #11050 from spowelljr/runLint
Check if go mod tidy || make generate-docs create file changes in CIpull/11150/head
commit
08fe139136
10
test.sh
10
test.sh
|
@ -17,6 +17,7 @@
|
||||||
set -eu -o pipefail
|
set -eu -o pipefail
|
||||||
|
|
||||||
TESTSUITE="${TESTSUITE:-all}" # if env variable not set run all the tests
|
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
|
exitcode=0
|
||||||
|
|
||||||
if [[ "$TESTSUITE" = "lint" ]] || [[ "$TESTSUITE" = "all" ]] || [[ "$TESTSUITE" = "lintall" ]]
|
if [[ "$TESTSUITE" = "lint" ]] || [[ "$TESTSUITE" = "all" ]] || [[ "$TESTSUITE" = "lintall" ]]
|
||||||
|
@ -25,7 +26,14 @@ then
|
||||||
make -s lint-ci && echo ok || ((exitcode += 4))
|
make -s lint-ci && echo ok || ((exitcode += 4))
|
||||||
echo "= go mod ================================================================"
|
echo "= go mod ================================================================"
|
||||||
go mod download 2>&1 | grep -v "go: finding" || true
|
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
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue