Skip to content

Commit

Permalink
Add dialyzer to CI (with caching of PLTs)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkallos committed Nov 30, 2022
1 parent fe505fa commit 6d394f3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
lint: true
coverage: true
report: true
dialyzer: true
- erlang: "24.3"
elixir: "1.12"
- erlang: "23.3.1"
Expand Down Expand Up @@ -65,6 +66,26 @@ jobs:
run: mix compile --warnings-as-errors
if: ${{ matrix.lint }}

- name: Restore cached PLTs
uses: actions/cache@v3
id: plt_cache
with:
key: |
${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.erlang }}-plt
restore-keys: |
${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.erlang }}-plt
path: |
priv/plts
# Create PLTs if no cached PLTs were found
- name: Create PLTs
if: steps.plt_cache.outputs.cache-hit != 'true'
run: MIX_ENV=test mix dialyzer --plt

- name: Run dialyzer
run: MIX_ENV=test mix dialyzer
if: ${{ matrix.dialyzer }}

- name: Run tests with coverage
run: mix coveralls.github
if: ${{ matrix.coverage }}
Expand Down

0 comments on commit 6d394f3

Please sign in to comment.