Skip to content

Commit

Permalink
Merge pull request #461 from inaka/ferigis.456.add_travis
Browse files Browse the repository at this point in the history
[#456] Adding Travis
  • Loading branch information
elbrujohalcon authored May 6, 2018
2 parents 0898f50 + 9844052 commit cfc9771
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 5 deletions.
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sudo: false
language: erlang
otp_release:
- 19.2
before_install:
- ./ci before_install "${PWD:?}"/rebar3
install:
- ./ci install "${PWD:?}"/rebar3
script:
- ./ci script "${PWD:?}"/rebar3
cache:
directories:
- .plt
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![](http://www.reactiongifs.com/wp-content/uploads/2013/01/elvis-dance.gif)

# elvis
# elvis [![Build Status](https://travis-ci.org/inaka/elvis.svg?branch=master)](https://travis-ci.org/inaka/elvis)

Command-line interface for Elvis, the Erlang style reviewer.

Expand Down
21 changes: 21 additions & 0 deletions ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -ev # Ref https://docs.travis-ci.com/user/customizing-the-build/#Implementing-Complex-Build-Steps

case "${1:?}" in
before_install)
## Travis CI does not support rebar3 yet. See https://github.com/travis-ci/travis-ci/issues/6506#issuecomment-275189490
Rebar3="${2:?}"
curl -f -L -o "${Rebar3:?}" https://github.com/erlang/rebar3/releases/download/3.3.5/rebar3
chmod +x "${Rebar3:?}"
;;
install)
Rebar3="${2:?}"
"${Rebar3:?}" deps
"${Rebar3:?}" dialyzer -u true -s false
;;
script)
Rebar3="${2:?}"
"${Rebar3:?}" ct
;;
esac
6 changes: 3 additions & 3 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

{profiles, [
{test, [
{deps, [ {mixer, "0.1.5", {pkg, inaka_mixer}}
, {meck, "0.8.4"}
, {xref_runner, "1.0.0"}
{deps, [ {mixer, "1.0.0", {pkg, inaka_mixer}}
, {meck, "0.8.9"}
, {xref_runner, "1.1.0"}
]}
]},
{shell, [
Expand Down
1 change: 1 addition & 0 deletions test/elvis_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ run_webhook(_Config) ->
EmptyResultFun = fun(_, _, _) -> {ok, []} end,
meck:expect(egithub, pull_req_comments, EmptyResultFun),
meck:expect(egithub, issue_comments, EmptyResultFun),
meck:expect(egithub, pr_reviews, EmptyResultFun),

FakeFun2 = fun(_, _, _, "elvis.config") ->
{error, error}
Expand Down
2 changes: 1 addition & 1 deletion test/git_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,5 @@ check_branch_files(_Config) ->

-spec random_file_name() -> string().
random_file_name() ->
RandomString = integer_to_list(crypto:rand_uniform(0, 1 bsl 127)),
RandomString = integer_to_list(rand:uniform(1 bsl 127)),
"test_file_" ++ RandomString.

0 comments on commit cfc9771

Please sign in to comment.