2019-04-28 17:34:46 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-05-14 03:53:26 +00:00
|
|
|
if ! (docker --version); then
|
2019-04-28 17:34:46 +00:00
|
|
|
printf 'Docker is required to run the starship integration tests.\n'
|
|
|
|
printf 'Please download and install Docker in order to run these tests locally.\n'
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2019-05-29 11:27:18 +00:00
|
|
|
printf 'Pulling latest docker image'
|
|
|
|
docker pull starshipcommand/starship-test
|
|
|
|
|
2019-04-28 17:34:46 +00:00
|
|
|
printf 'Building test docker image:\n'
|
2019-05-29 11:27:18 +00:00
|
|
|
docker build -f tests/Dockerfile \
|
|
|
|
--tag starshipcommand/starship-test \
|
|
|
|
--cache-from starshipcommand/starship-test \
|
|
|
|
.
|
2019-04-28 17:34:46 +00:00
|
|
|
|
|
|
|
printf 'Running test suite:\n'
|
2019-05-29 20:58:46 +00:00
|
|
|
# `seccomp=unconfined` is needed to allow tarpaulin to disable ASLR
|
|
|
|
# Details found here: https://github.com/xd009642/tarpaulin/issues/146
|
|
|
|
docker run --rm --security-opt seccomp=unconfined -v $(pwd):/starship starshipcommand/starship-test
|