-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (49 loc) · 1.96 KB
/
elixir-dialyzer.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Elixir Type Linting
on:
push:
branches:
- main
pull_request:
branches:
- '*'
jobs:
build:
name: Run Dialyzer
runs-on: ubuntu-latest
env:
MIX_ENV: dev
strategy:
matrix:
elixir: ["1.16.2"]
otp: ["25.3.2"]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Elixir Project
uses: ./.github/actions/elixir-setup
id: beam
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
build-app: false
# 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@v3
id: plt_cache
with:
key: plt-${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-${{ hashFiles('**/mix.lock') }}-${{ hashFiles('**/*.ex') }}
restore-keys: |
plt-${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-${{ hashFiles('**/mix.lock') }}-${{ hashFiles('**/*.ex') }}
plt-${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-${{ hashFiles('**/mix.lock') }}-
plt-${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-${{ steps.beam.outputs.elixir-version }}-
plt-${{ runner.os }}-${{ steps.beam.outputs.otp-version }}-
path: priv/plts
# Create PLTs if no cache was found.
# Always rebuild PLT when a job is retried
# (If they were cached at all, they'll be updated when we run mix dialyzer with no flags.)
- name: Create PLTs
if: steps.plt_cache.outputs.cache-hit != 'true' || github.run_attempt != '1'
run: mix dialyzer --plt
- name: Run Dialyzer
run: mix dialyzer --format github