Skip to content

Instantly share code, notes, and snippets.

@niku
Last active April 17, 2017 03:58
Show Gist options
  • Save niku/cf8e7615ba574ea517cd16a6c4824b16 to your computer and use it in GitHub Desktop.
Save niku/cf8e7615ba574ea517cd16a6c4824b16 to your computer and use it in GitHub Desktop.
Elixir製のプロジェクトをTravisCIで運用するための.travis.yml ref: http://qiita.com/niku/items/9c205a9d84d4dd24ddfe
language: elixir
sudo: false
otp_release:
- 19.3
elixir:
- 1.4.2
env:
global:
- HEX_USERNAME=niku
# Follow other language's environment
# e.g.) `RACK_ENV=test` has been setted as Default Environment Variables
# https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables
- MIX_ENV=test
cache:
directories:
- _build
- deps
script:
- mix credo --strict
# https://github.com/jeremyjh/dialyxir#command-line-options
# > exit immediately with same exit status as dialyzer. useful for CI
- mix dialyzer --halt-exit-status
- mix test
deploy:
# https://docs.travis-ci.com/user/deployment/script/
# must be a scalar pointing to an executable file or command.
provider: script
script: >-
mix deps.get &&
mix hex.config username "$HEX_USERNAME" &&
(mix hex.config encrypted_key "$HEX_ENCRYPTED_KEY" > /dev/null 2>&1) &&
(echo "$HEX_PASSPHRASE"\\nY | mix hex.publish) &&
mix clean &&
mix deps.clean --all
on:
tags: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment