Skip to content

raniemi/elixir_examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status

Elixir Examples

This git repository is used (by me) to document things I have learned about the Elixir language and to test out new tools that support it.

Prerequisites

If you want to use this repository then you'll need to either install Elixir first or use the Docker Toolbox. The benefits of the latter is that it will be easier for you to bump up/down versions of Elixir (and it's dependencies) without polluting your host.

Background

This Elixir project was originally created using mix:

mix new elixir_examples --module ElixirExamples

Usage

To use this repository:

git clone https://github.com/raniemi/elixir_examples.git
cd elixir_examples

If you already have Elixir, mix, etc. installed on your host then you could forgo Docker all together and invoke the mix commands directly as follows:

mix do deps.get, compile

If you decide to use Docker then you will need to build the docker image as follows:

docker build -t raniemi/elixir_examples .

Or alternatively:

./bin/docker-build

Following on the earlier mix example, all you have to do to use the tools installed on Docker is to prefix the same command with ./bin/docker-run. For example:

./bin/docker-run mix do clean, deps.get, compile

Helpful Commands

As I started working with this project and docker, I quickly became tired typing the docker-run prefix constantly (think bundle exec), knowing when to specify a MIX_ENV, and having to run post-commands after the fact (i.e. I just ran code coverage and so I now want to see the HTML report). As a means of convenience, I created some bash scripts in the mix/ directory. For example:

Run tests (with code coverage):

./mix/test-cover

TODO

  • Figure out if there is a way to suppress dialyzer warnings in tests which are known to intentionally produce those warnings
  • Lots more

Reference

Links that I have found to be helpful:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors