script/travis-script
#!/bin/bash
########################
# Purpose: To perform CI on travis-ci.org
# Author: Prasad Talasila
# Date: 10-April-2017
# Invocation: This script does not require any arguements. From the project top-level
# directory, invoke as follows. ONLY INVOKE INSIDE TRAVIS-CI ENVIRONMENT.
# $bash script/travis
########################
set -e
source "$HOME/.bashrc"
mix compile
# report test coverage to coveralls.io
# shellcheck disable=SC2037
MIX_ENV=unit mix coveralls.travis --umbrella --exclude slow
MIX_ENV=integration mix coveralls.travis --umbrella --exclude slow
# report test coverage to codecov
# shellcheck disable=SC2037
MIX_ENV=unit mix do compile coveralls.json
MIX_ENV=integration mix do compile coveralls.json
# lint code using credo
# shellcheck disable=SC2037
MIX_ENV=unit mix credo --strict
MIX_ENV=integration mix credo --strict
MIX_ENV=unit mix test --exclude slow
MIX_ENV=integration mix test --exclude slow
mix profile