Skip to content

Commit

Permalink
Add dialyzer check
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanppl committed Feb 9, 2025
1 parent 6434a4b commit 67547f4
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,39 @@ jobs:
- name: Check Doctor
run: mix doctor

# 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: Restore PLT cache
uses: actions/cache/restore@v4
id: plt_cache
with:
key: |
plt-${{ runner.os }}-${{ env.PLT_CACHE_VERSION }}
restore-keys: |
plt-${{ runner.os }}-${{ env.PLT_CACHE_VERSION }}
path: |
priv/plts
# Create PLTs if no cache was found
- name: Create PLTs
if: steps.plt_cache.outputs.cache-hit != 'true'
run: mix dialyzer --plt

# By default, the GitHub Cache action will only save the cache if all steps in the job succeed,
# so we separate the cache restore and save steps in case running dialyzer fails.
- name: Save PLT cache
uses: actions/cache/save@v4
if: steps.plt_cache.outputs.cache-hit != 'true'
id: plt_cache_save
with:
key: |
plt-${{ runner.os }}-${{ env.PLT_CACHE_VERSION }}
path: |
priv/plts
- name: Run dialyzer
run: mix dialyzer

test:
# Set up a Postgres DB service. By default, Phoenix applications
# use Postgres. This creates a database for running tests.
Expand Down

0 comments on commit 67547f4

Please sign in to comment.