Skip to content

Commit

Permalink
Run Dialyzer in CI (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
whatyouhide committed Jun 27, 2022
1 parent 7fb1c12 commit 7308c09
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,30 @@ jobs:
elixir-version: ${{matrix.elixir}}

- name: Install dependencies
run: mix deps.get --only test
run: mix deps.get --only test, deps.compile

# 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)
- name: Cache Dialyzer's PLT
uses: actions/cache@v2
id: cache-plt
with:
path: priv/plts
key: ${{ runner.os }}-otp${{ matrix.otp }}-elixir${{ matrix.elixir }}

# Create PLTs if no cache was found
- name: Create PLTs
if: steps.cache-plt.outputs.cache-hit != 'true'
run: mix do deps.get, dialyzer --plt

- name: Check formatting
run: mix format --check-formatted
if: ${{matrix.lint}}

- name: Check for unused dependencies
run: mix deps.get && mix deps.unlock --check-unused
run: mix do deps.get, deps.unlock --check-unused
if: ${{matrix.lint}}

- name: Compile dependencies
run: mix deps.compile

- name: Compile with --warnings-as-errors
run: mix compile --warnings-as-errors
if: ${{matrix.lint}}
Expand All @@ -59,3 +70,6 @@ jobs:
- name: Run tests with coverage
run: mix coveralls.github --trace
if: ${{matrix.coverage}}

- name: Run Dialyzer
run: mix dialyzer

0 comments on commit 7308c09

Please sign in to comment.