-
Notifications
You must be signed in to change notification settings - Fork 41
Setup Elixir
Daniel Perez edited this page Nov 29, 2015
·
1 revision
-
Add the following line to your config file.
config :excoveralls, :endpoint, "http://example.com/opencov"
Do not forget to replace
http://example.com/opencov
with your OpenCov endpoint. -
Put the following in a shell script. I will call it
cover.sh
here. Check the comments in the shell script.#!/bin/sh # this should be kept secret # if your CI is able to setup env vars, this one should be better there export COVERALLS_REPO_TOKEN="your_opencov_repo_token" # when using Travis CI export GIT_COMMIT="$TRAVIS_COMMIT" export GIT_BRANCH="$TRAVIS_BRANCH" # use the env variables provided by your CI when possible # if non is available, or you want to run it locally, use # export GIT_COMMIT="$(git rev-parse HEAD)" # export GIT_BRANCH="$(git name-rev --name-only HEAD)" MIX_ENV=test mix coveralls.post \ --sha="$GIT_COMMIT" \ --committer="$(git log -1 $GIT_COMMIT --pretty=format:'%cN')" \ --message="$(git log -1 $GIT_COMMIT --pretty=format:'%s')" \ --branch="$GIT_BRANCH"
-
Replace your CI test task with
cover.sh
instead ofmix test
.