#!/bin/bash

set -euo pipefail

WORKSPACE=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && /bin/pwd -P)

OS_ARG=${1:?}

bazel build //...

bazel test --test_output=all //core/... //pull/...
bazel test --test_output=all //pull/tests/integration:scrape-test

#if [[ "${OS_ARG}" == "macOS"* ]]
#then
#    bazel test --test_output=all //pull/tests/integration:lint-test
#fi

bazel run -c opt //core/benchmarks
