Skip to content

Commit

Permalink
ci: cache dependencies for dialyzer action
Browse files Browse the repository at this point in the history
  • Loading branch information
heywhy committed Mar 5, 2022
1 parent 76f80b6 commit 0fcb8de
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/dialyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@ jobs:
otp-version: "24"
elixir-version: "1.12"

- name: Install Dependencies
run: |
mix deps.get
- name: Restore Cached Dependencies
uses: actions/cache@v2
id: mix-cache
with:
path: |
deps
_build
key: ${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-${{ hashFiles('mix.lock') }}

- name: Restore PLT cache
uses: actions/cache@v2
id: plt_cache
id: plt-cache
with:
key: |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-plt
Expand All @@ -28,8 +33,13 @@ jobs:
path: |
priv/plts
- name: Install Dependencies
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
mix deps.get
- name: Create PLTs
if: steps.plt_cache.outputs.cache-hit != 'true'
if: steps.plt-cache.outputs.cache-hit != 'true'
run: mix dialyzer --plt

- name: Run dialyzer
Expand Down

0 comments on commit 0fcb8de

Please sign in to comment.