diff --git a/.envrc b/.envrc deleted file mode 100644 index e04b6ccce..000000000 --- a/.envrc +++ /dev/null @@ -1,2 +0,0 @@ -export PROJECT_DIR=$PWD -export GO111MODULE=on diff --git a/scripts/subtests/lint b/scripts/subtests/lint new file mode 100755 index 000000000..bb8f5c95b --- /dev/null +++ b/scripts/subtests/lint @@ -0,0 +1,18 @@ +#!/bin/bash + +set -eux +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" + +set +e +golangci_lint_executable=$(which golangci-lint) +set -e +if [ -z "${golangci_lint_executable}" ] || [ ! -x "${golangci_lint_executable}" ]; then + go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest +fi + +pushd "${SCRIPT_DIR}/../../src" > /dev/null + golangci-lint run ./... +popd > /dev/null + diff --git a/scripts/subtests/unit-test b/scripts/subtests/unit-test new file mode 100755 index 000000000..1d50d7eea --- /dev/null +++ b/scripts/subtests/unit-test @@ -0,0 +1,11 @@ +#!/bin/bash + +set -eux +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" + +pushd "${SCRIPT_DIR}/../../src" > /dev/null + go run github.com/onsi/ginkgo/v2/ginkgo -r -p --randomize-all --randomize-suites --fail-on-pending --keep-going --race --trace +popd > /dev/null + diff --git a/scripts/test b/scripts/test new file mode 100755 index 000000000..382cecd0a --- /dev/null +++ b/scripts/test @@ -0,0 +1,10 @@ +#!/bin/bash + +set -eux +set -o pipefail + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" + +"${SCRIPT_DIR}/subtests/lint" +"${SCRIPT_DIR}/subtests/unit-test" +