From 0fcb8dede8ac59aa456c8312253c33ba23e9f36a Mon Sep 17 00:00:00 2001 From: atanda rasheed Date: Sat, 5 Mar 2022 23:48:45 +0100 Subject: [PATCH] ci: cache dependencies for dialyzer action --- .github/workflows/dialyzer.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dialyzer.yml b/.github/workflows/dialyzer.yml index df0f542..85dc880 100644 --- a/.github/workflows/dialyzer.yml +++ b/.github/workflows/dialyzer.yml @@ -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 @@ -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