Skip to content

Commit

Permalink
[#193] Setting Travis up
Browse files Browse the repository at this point in the history
  • Loading branch information
ferigis committed Jul 6, 2017
1 parent 4972fe7 commit 3ca6363
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
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
@@ -1,5 +1,5 @@

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

<img src="https://media.giphy.com/media/uZQP0PR0BmkGA/giphy.gif" align="right" style="float:right" height="400" />
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

0 comments on commit 3ca6363

Please sign in to comment.