Some checks failed
ci/woodpecker/push/fx_oracle Pipeline is pending
ci/woodpecker/push/gateway_mntx Pipeline is pending
ci/woodpecker/push/gateway_tron Pipeline is pending
ci/woodpecker/push/ledger Pipeline is pending
ci/woodpecker/push/payments_methods Pipeline is pending
ci/woodpecker/push/payments_orchestrator Pipeline is pending
ci/woodpecker/push/payments_quotation Pipeline is pending
ci/woodpecker/push/gateway_chain Pipeline is pending
ci/woodpecker/push/gateway_tgsettle Pipeline is pending
ci/woodpecker/push/notification Pipeline is pending
ci/woodpecker/push/billing_documents Pipeline failed
ci/woodpecker/push/callbacks Pipeline failed
ci/woodpecker/push/discovery Pipeline failed
ci/woodpecker/push/bff Pipeline failed
ci/woodpecker/push/frontend Pipeline failed
ci/woodpecker/push/billing_fees Pipeline failed
ci/woodpecker/push/fx_ingestor Pipeline failed
48 lines
989 B
Bash
Executable File
48 lines
989 B
Bash
Executable File
#!/usr/bin/env sh
|
|
set -eu
|
|
|
|
if ! set -o pipefail 2>/dev/null; then
|
|
:
|
|
fi
|
|
|
|
SERVICE="${1:-}"
|
|
if [ -z "${SERVICE}" ]; then
|
|
echo "usage: $0 <service-key>" >&2
|
|
exit 2
|
|
fi
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
REPO_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)"
|
|
cd "${REPO_ROOT}"
|
|
|
|
if bypass_reason="$(sh "${SCRIPT_DIR}/should_bypass_backend_check.sh" "${SERVICE}" tests)"; then
|
|
echo "[backend-tests] ${bypass_reason}"
|
|
exit 0
|
|
fi
|
|
|
|
# shellcheck source=ci/scripts/common/backend_modules.sh
|
|
. "${SCRIPT_DIR}/backend_modules.sh"
|
|
|
|
if ! modules="$(backend_service_modules "${SERVICE}")"; then
|
|
echo "[backend-tests] unknown service key: ${SERVICE}" >&2
|
|
exit 2
|
|
fi
|
|
|
|
run_go_tests() {
|
|
module="$1"
|
|
if [ ! -f "${module}/go.mod" ]; then
|
|
echo "[backend-tests] missing go.mod for module: ${module}" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "[backend-tests] running go test ./... in ${module}"
|
|
(
|
|
cd "${module}"
|
|
go test ./...
|
|
)
|
|
}
|
|
|
|
for module in ${modules}; do
|
|
run_go_tests "${module}"
|
|
done
|