#!/usr/bin/env bash
set -euo pipefail

root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"

"$root/bin/contracts-check"

for module in \
  "$root/packages/contracts/gen/go" \
  "$root/packages/domain" \
  "$root/services/api" \
  "$root/services/worker" \
  "$root/apps/cli"
do
  (cd "$module" && go test ./...)
done

(cd "$root/apps/client" && flutter test)
