7878 runs-on : ubuntu-latest
7979 name : Run Dialyzer
8080 env :
81- project_mix_lock : ${{ format('{0}{1}', github.workspace, '/mix.lock') }}
82- projects_ex_blob : ${{ format('{0}{1}', github.workspace, '/projects/**/*.ex') }}
83- projects_locks_blob : ${{ format('{0}{1}', github.workspace, '/projects/*/mix.lock') }}
81+ apps_mix_lock : ${{ format('{0}{1}', github.workspace, 'apps/**/mix.lock') }}
8482 MIX_ENV : dev
8583 steps :
8684 # Step: Setup Elixir + Erlang image as the base.
9593 - name : Checkout code
9694 uses : actions/checkout@v4
9795
98- - name : Set Variables
99- id : set_mix_lock_hash
100- run : |
101- mix_lock_hash="${{ hashFiles(env.project_mix_lock) }}"
102- projects_hash="${{ hashFiles(env.projects_ex_blob, env.projects_locks_blob) }}"
103- echo "mix_lock_hash=$mix_lock_hash::$projects_hash" >> "$GITHUB_OUTPUT"
104-
10596 # Step: Define how to cache deps. Restores existing cache if present.
10697 - name : Cache deps
10798 id : cache-deps
@@ -113,7 +104,7 @@ jobs:
113104 apps/**/deps
114105 apps/**/_build
115106
116- key : ${{ runner.os }}-mix-${{ env.DEFAULT_ELIXIR }}-${{ env.DEFAULT_OTP }}-${{ hashFiles('**/mix.lock') }}
107+ key : ${{ runner.os }}-mix-${{ env.DEFAULT_ELIXIR }}-${{ env.DEFAULT_OTP }}-${{ hashFiles('apps/ **/mix.lock') }}
117108 restore-keys : |
118109 ${{ runner.os }}-mix-${{ env.DEFAULT_ELIXIR }}-${{ env.DEFAULT_OTP }}-
119110
@@ -123,7 +114,10 @@ jobs:
123114 uses : actions/cache@v3
124115 with :
125116 path : " priv/plts"
126- key : lexical-plts-2-${{ env.DEFAULT_OTP }}-${{ env.DEFAULT_ELIXIR }}-${{ steps.set_mix_lock_hash.outputs.mix_lock_hash }}
117+ key : lexical-plts-2-${{ env.DEFAULT_OTP }}-${{ env.DEFAULT_ELIXIR }}-${{ hashFiles('apps/**/mix.lock' ) }}-${{ github.run_id }}
118+ restore-keys : |
119+ lexical-plts-2-${{ env.DEFAULT_OTP }}-${{ env.DEFAULT_ELIXIR }}-${{ hashFiles('apps/**/mix.lock') }}-
120+ lexical-plts-2-${{ env.DEFAULT_OTP }}-${{ env.DEFAULT_ELIXIR }}-
127121
128122 # Step: Download project dependencies. If unchanged, uses
129123 # the cached version.
0 commit comments