#!/bin/bash -ex function cleanup() { exit_code=$? set +e docker cp coverage:/app/coverage . docker-compose kill docker-compose rm -f exit $exit_code } trap cleanup INT TERM EXIT set -e docker-compose build --pull echo "Running test suite..." docker-compose run --name coverage testrunner $@