2019-04-28 19:34:46 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-05-14 05:53:26 +02:00
|
|
|
if ! (docker --version); then
|
2019-09-13 01:01:14 +02:00
|
|
|
printf 'Docker is required to run the starship acceptance tests.\n'
|
2019-04-28 19:34:46 +02:00
|
|
|
printf 'Please download and install Docker in order to run these tests locally.\n'
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
printf 'Building test docker image:\n'
|
2019-05-29 13:27:18 +02:00
|
|
|
docker build -f tests/Dockerfile \
|
|
|
|
--tag starshipcommand/starship-test \
|
|
|
|
--cache-from starshipcommand/starship-test \
|
|
|
|
.
|
2019-04-28 19:34:46 +02:00
|
|
|
|
|
|
|
printf 'Running test suite:\n'
|
2019-09-08 23:46:12 +02:00
|
|
|
docker run --rm -v $(pwd):/src/starship --security-opt="label=disable" starshipcommand/starship-test
|