-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (49 loc) · 1.38 KB
/
test_format_dialyze.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
name: Elixir CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main, release/** ]
jobs:
build:
name: Build and test
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'true'
- name: Set up Elixir
uses: erlef/[email protected]
with:
version-file: .tool-versions
version-type: strict
- name: Set mix.lock file hash environment variable
run: echo "MIX_LOCK_HASH=${{ hashFiles('**/mix.lock') }}" >> $GITHUB_ENV
shell: bash
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-deps-${{ env.MIX_LOCK_HASH }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Restore build artifacts
uses: actions/cache@v2
with:
path: _build
key: ${{ runner.os }}-build-${{ env.MIX_LOCK_HASH }}
restore-keys: ${{ runner.os }}-build-
- name: Check formatting
run: mix format --check-formatted
- name: Run tests
run: mix test
- name: Restore dialyzer PLTS
uses: actions/cache@v2
with:
path: priv/plts
key: ${{ runner.os }}-plts-${{ env.MIX_LOCK_HASH }}
restore-keys: ${{ runner.os }}-plts-
- name: Run dialyzer
run: mix dialyzer