-
Notifications
You must be signed in to change notification settings - Fork 92
84 lines (70 loc) · 2.28 KB
/
static-analysis.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Static Analysis
on:
push:
pull_request:
branches:
- main
jobs:
check_duplicate_runs:
name: Check for duplicate runs
continue-on-error: true
runs-on: ubuntu-20.04
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/[email protected]
with:
concurrent_skipping: always
cancel_others: true
skip_after_successful_duplicate: true
paths_ignore: '["**/README.md", "**/CHANGELOG.md", "**/LICENSE.txt"]'
do_not_skip: '["pull_request"]'
dialyzer:
name: Static code analysis
runs-on: ubuntu-20.04
strategy:
matrix:
elixir:
- "1.11"
otp:
- "23.0"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Restore deps cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-{{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
- name: Restore _build cache
uses: actions/cache@v2
with:
path: _build
key: ${{ runner.os }}-build-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
${{ runner.os }}-build-${{ matrix.otp }}-${{ matrix.elixir }}
- name: Install hex
run: mix local.hex --force
- name: Install rebar
run: mix local.rebar --force
- name: Install package dependencies
run: mix deps.get
- name: Compile package dependencies
run: mix deps.compile
- name: Restore Dialyzer cache
uses: actions/cache@v2
with:
path: priv/plts
key: ${{ runner.os }}-dialyzer-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-dialyzer-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
${{ runner.os }}-dialyzer-${{ matrix.otp }}-${{ matrix.elixir }}
- name: Run dialyzer
run: mix dialyzer --format dialyxir