Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 1.66 KB

CONTRIBUTING.md

File metadata and controls

51 lines (37 loc) · 1.66 KB

Development

  1. Install Elixir The recommended way to install elixir is using asdf. This allows you to manage multiple versions of elixir/erlang on your machine. To install asdf, see their Getting Started docs. For macs you can install via homebrew:
brew install asdf
echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ${ZDOTDIR:-~}/.zshrc

Then restart your shell.

Next, install erlang and elixir via asdf:

asdf plugin add erlang
asdf install erlang 25.3.2.2
asdf global erlang 25.3.2.2
asdf plugin add elixir
asdf install elixir 1.14.5
asdf global elixir 1.14.5
Alternately you may install elixir via homebrew, which is a little faster for the initial install but will prevent you from being able to easily switch between different versions of elixir/erlang. To install via homebrew: 

* `brew install elixir`
  1. Clone repo
  2. Switch to the src directory
    • cd src
  3. Pull down the dependencies and compile
    • mix deps.get
    • mix compile
  4. To run unit tests:
    • mix test
  5. To run integration tests:
    • Generate auth token with momento-cli (if you don't already have one)
    • TEST_AUTH_TOKEN=<auth token> TEST_CACHE_NAME=<cache id> mix test integration-test
      • TEST_CACHE_NAME is required. Give it any string value for now.

Code Formatting and Type Checking

Mix has a built-in formatting tool that should be run before any commit:

mix format

Use dialyzer to check types before committing:

mix dialyzer