-
-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #491 from merwan/circleci-documentation
Add CircleCI example configuration
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# CircleCI | ||
|
||
```yaml | ||
--- | ||
version: 2 | ||
|
||
jobs: | ||
build: | ||
docker: | ||
- image: cimg/elixir:1.14 | ||
|
||
steps: | ||
- checkout | ||
|
||
# Compile steps omitted for simplicity | ||
|
||
# Don't cache PLTs based on mix.lock hash, as Dialyzer can incrementally update even old ones | ||
# Cache key based on Elixir & Erlang version (also useful when running in matrix) | ||
- run: | ||
name: "Save Elixir and Erlang version for PLT caching" | ||
command: echo "$ELIXIR_VERSION $ERLANG_VERSION" > .elixir_otp_version | ||
|
||
- restore_cache: | ||
name: "Restore PLT cache" | ||
keys: | ||
- {{ arch }}-{{ checksum ".elixir_otp_version" }}-plt | ||
|
||
- run: | ||
name: "Create PLTs" | ||
command: mix dialyzer --plt | ||
|
||
- save_cache: | ||
name: "Save PLT cache" | ||
key: {{ arch }}-{{ checksum ".elixir_otp_version" }}-plt | ||
paths: "priv/plts" | ||
|
||
- run: | ||
name: "Run dialyzer" | ||
command: mix dialyzer | ||
``` |