-
Notifications
You must be signed in to change notification settings - Fork 79
/
test
executable file
·25 lines (22 loc) · 1.11 KB
/
test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env bash
MIX_ENV=test mix compile --warnings-as-errors --force || { echo 'Please fix all compiler warnings.'; exit 1; }
MIX_ENV=test mix credo --strict --ignore design,consistency || { echo 'Elixir code failed Credo linting. See warnings above.'; exit 1; }
MIX_ENV=test mix docs || { echo 'Elixir HTML docs were not generated!'; exit 1; }
MIX_ENV=test mix test || { echo 'Elixir tests on Torch failed!'; exit 1; }
if [ $CI ]; then
if [ $TRAVIS ]; then
echo "----------------------------------------------------------"
echo "Running coveralls.travis..."
echo "----------------------------------------------------------"
mix coveralls.travis || { echo 'Elixir coverage on Torch failed!'; exit 1; }
else
echo "----------------------------------------------------------"
echo "Running coveralls..."
echo "----------------------------------------------------------"
mix coveralls || { echo 'Elixir coverage on Torch failed!'; exit 1; }
fi
fi
# Run integration tests
cd test/support/apps/example && {
bin/test || { echo 'Integration tests on regular Phoenix project failed!'; exit 1; }
}