-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathstatic-code-analysis-reusable.yml
More file actions
62 lines (53 loc) · 1.85 KB
/
Copy pathstatic-code-analysis-reusable.yml
File metadata and controls
62 lines (53 loc) · 1.85 KB
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
57
58
59
60
61
62
name: analysis
run-name: Static Code Analysis - ${{ github.event.pull_request.title || github.event.head_commit.message || github.ref }}
on:
workflow_call:
inputs:
elixir:
required: true
type: string
otp:
required: true
type: string
os:
type: string
default: ubuntu-latest
jobs:
static_code_analysis:
name: Static Code Analysis Elixir ${{ inputs.elixir }} OTP ${{ inputs.otp }} - ${{ inputs.os }}
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Elixir
uses: erlef/setup-beam@v1.18.2
with:
otp-version: ${{ inputs.otp }}
elixir-version: ${{ inputs.elixir }}
- name: Restore dependencies cache
id: mix_cache
uses: actions/cache/restore@v4
with:
path: |
deps
_build
key: ${{ runner.os }}-${{ inputs.otp }}-${{ inputs.elixir }}-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-${{ inputs.elixir }}-${{ inputs.otp }}-mix-
- name: Restore PLT cache
uses: actions/cache/restore@v4
id: plt_cache
with:
path: priv/plts
key: plt-${{ runner.os }}-${{ inputs.elixir }}-${{ inputs.otp }}-${{ hashFiles('**/mix.lock') }}
restore-keys: plt-${{ runner.os }}-${{ inputs.elixir }}-${{ inputs.otp }}-plt-
- name: Create PLTs
if: steps.plt_cache.outputs.cache-hit != 'true'
run: mix dialyzer --plt
- name: Save PLT cache
uses: actions/cache/save@v4
id: plt_cache_save
if: steps.plt_cache.outputs.cache-hit != 'true'
with:
path: priv/plts
key: plt-${{ runner.os }}-${{ inputs.elixir }}-${{ inputs.otp }}-${{ hashFiles('**/mix.lock') }}
- name: Run Dialyzer
run: mix dialyzer --format github