#!/bin/bash

# Halt this script on non-zero returns codes
# and properly pipe failures
set -eo pipefail

DOCKER_RUN_APP_CMD="docker-compose -f ./.buildkite/docker-compose-ci.yml run --rm cheryl"

echo -e "--- Setting Up Environment"
$DOCKER_RUN_APP_CMD /bin/bash -c "rm -rf node_modules && npm ci"

echo -e "--- Running Archer JS Tests"
$DOCKER_RUN_APP_CMD npm run test -- --coverage
