Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save joshuataylor/a55e7dcb49838c0868227a2682a701ed to your computer and use it in GitHub Desktop.
Save joshuataylor/a55e7dcb49838c0868227a2682a701ed to your computer and use it in GitHub Desktop.
steps:
- checkout
- restore_cache:
keys:
- project-{{ checksum "mix.exs" }}-{{ checksum "mix.lock" }}
- run:
name: deps
command: MIX_ENV=test mix deps.get
- run:
name: compile test
command: MIX_ENV=test mix compile
- save_cache:
key: project-{{ checksum "mix.exs" }}-{{ checksum "mix.lock" }}
paths:
- _build
- deps
- run:
name: test
command: mix test
@noma4i
Copy link

noma4i commented May 18, 2017

Heads up!
Caching _build/deps is HIGHLY not recommended as it has lots of consequence. Example: changing mime for plug will need recompile plug deps. Change in umbrella app with Ecto sandbox will need deps to be recompiled etc.

elixir-ecto/ecto#1355 (comment)
elixir-plug/plug#334
elixir-ecto/postgrex#131

There are many issues around caching _build/deps

@joshuataylor
Copy link
Author

Ah! That makes sense, thnaks @noma4i ! Will remove that then, didn't know it had such ramifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment