Skip to content

Commit 5b930b8

Browse files
committed
ci: key dialyzer cache by erlang/elixir version
Dialyzer was intermittently failing with `Old PLT file` when the cached PLT was restored after the Erlang/Elixir toolchain changed. Update the backend dialyzer workflow to compute a cache prefix from the erlang and elixir entries in .tool-versions. Forcing a rebuild when the runtime that affects Dialyzer changes. Signed-off-by: Omar <omar.brbutovic@secomind.com>
1 parent 0f09b2e commit 5b930b8

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/backend-dialyzer.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@ jobs:
3535
runs-on: ubuntu-latest
3636
steps:
3737
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
38+
- name: Compute Dialyzer cache prefix
39+
id: dialyzer-cache-prefix
40+
run: |
41+
cache_prefix="dialyzer-$(awk '/^(erlang|elixir) / { print $2 }' ../.tool-versions | tr '\n' '-' | sed 's/-$//')"
42+
echo "prefix=$cache_prefix" >> "$GITHUB_OUTPUT"
3843
- uses: team-alembic/staple-actions/actions/mix-dialyzer@41b1e46995448f976551fedad3ef6bf6ba7df873 # main
3944
with:
4045
working-directory: backend
4146
mix-env: test
47+
cache-prefix: ${{ steps.dialyzer-cache-prefix.outputs.prefix }}

0 commit comments

Comments
 (0)