2017-11-03 11:33:30 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
#
|
|
|
|
|
# Continuous Integration Script
|
|
|
|
|
#
|
|
|
|
|
# This script contains all the test commands for this app, which will be run
|
|
|
|
|
# on the continuous integration server.
|
|
|
|
|
|
2018-03-03 11:12:52 -08:00
|
|
|
MIX_ENV=test mix format --check-formatted || { echo 'Please format code using `mix format`.'; exit 1; }
|
2017-11-03 11:33:30 -07:00
|
|
|
MIX_ENV=test mix compile --warnings-as-errors --force || { echo 'Please fix all compiler warnings.'; exit 1; }
|
|
|
|
|
MIX_ENV=test mix docs || { echo 'Elixir HTML docs were not generated!'; exit 1; }
|
2018-03-03 11:38:17 -08:00
|
|
|
|
2018-01-02 09:25:13 -08:00
|
|
|
if [ $CI ]; then
|
2021-01-16 15:33:30 -08:00
|
|
|
mix coveralls.semaphore || { echo 'Elixir tests failed!'; exit 1; }
|
2018-01-02 09:25:13 -08:00
|
|
|
else
|
|
|
|
|
mix test || { echo 'Elixir tests failed!'; exit 1; }
|
|
|
|
|
fi
|