forked from mojotech/torch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest
executable file
·35 lines (29 loc) · 1.41 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
26
27
28
29
30
31
32
33
34
35
#!/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; }
TEST_ROOT="$(pwd)/test"
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_ROOT/support/apps/phx1_3" && {
bin/test || { echo 'Integration tests on regular Phoenix 1.3 project failed!'; exit 1; }
}
cd "$TEST_ROOT/support/apps/phx1_4" && {
bin/test || { echo 'Integration tests on regular Phoenix 1.4 project failed!'; exit 1; }
}
cd "$TEST_ROOT/support/apps/phx1_5" && {
bin/test || { echo 'Integration tests on regular Phoenix 1.5 project failed!'; exit 1; }
}