FitTrackee/test.sh
2018-04-29 18:56:56 +02:00

28 lines
485 B
Bash

#!/bin/bash
fails=''
inspect() {
if [ $1 -ne 0 ]; then
fails="${fails} $2"
fi
}
docker-compose -f docker-compose-ci.yml run mpwo-api py.test mpwo_api
inspect $? api
docker-compose -f docker-compose-ci.yml run mpwo-api flask db upgrade
docker-compose -f docker-compose-ci.yml run mpwo-api flask init_data
testcafe chrome mpwo_client/e2e
inspect $? e2e
if [ -n "${fails}" ];
then
echo "Tests failed: ${fails}"
exit 1
else
echo "Tests passed!"
exit 0
fi