#!/bin/bash echo "During testing, your local postgres and redis databases will not be touched." echo "This script will remove the build directories in the following locations:" echo " ./built" echo echo "Do you want to continue? [Y/n]" read -p "> " confirmation case $confirmation in [Yy]* ) echo "Continuing..." ;; [Nn] ) echo "Exiting..." exit 0 ;; esac cp .config/ci.yml .config/default.yml cp .config/ci.yml .config/test.yml cp .config/docker_ci.env .config/docker.env cp compose.local-test.yml compose.yml echo Verifying containers are down... docker compose down docker compose rm echo Removing any preexisting builds and databases. echo This may take a few moments... rm -rf ./built echo Creating environment docker compose up -d docker compose exec web apt-get update docker compose exec web apt-get install -y bash echo Building and running tests... docker compose exec web /host/tests.sh echo Cleaning up... docker compose down docker compose rm rm -f compose.yml