2018-01-13 13:00:05 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
fails=''
|
|
|
|
|
|
|
|
inspect() {
|
|
|
|
if [ $1 -ne 0 ]; then
|
|
|
|
fails="${fails} $2"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2018-06-07 14:45:43 +02:00
|
|
|
docker-compose -f docker-compose-ci.yml run fittrackee-api py.test fittrackee_api
|
2018-01-13 13:00:05 +01:00
|
|
|
inspect $? api
|
|
|
|
|
2018-06-07 14:45:43 +02:00
|
|
|
docker-compose -f docker-compose-ci.yml run fittrackee-api flask db upgrade
|
|
|
|
docker-compose -f docker-compose-ci.yml run fittrackee-api flask init_data
|
2018-04-10 22:11:33 +02:00
|
|
|
|
2018-06-07 14:45:43 +02:00
|
|
|
testcafe chrome fittrackee_client/e2e
|
2018-01-13 14:36:07 +01:00
|
|
|
inspect $? e2e
|
|
|
|
|
2018-01-13 13:00:05 +01:00
|
|
|
if [ -n "${fails}" ];
|
|
|
|
then
|
|
|
|
echo "Tests failed: ${fails}"
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
echo "Tests passed!"
|
|
|
|
exit 0
|
|
|
|
fi
|