-
Notifications
You must be signed in to change notification settings - Fork 16
55 lines (45 loc) · 1.24 KB
/
test.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
name: Run test suite and linters
on:
push:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup elixir
uses: erlef/setup-beam@v1
with:
otp-version: "26.2"
elixir-version: "1.16"
- name: Set mix file hash
id: set_vars
run: |
mix_hash="${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}"
echo "::set-output name=mix_hash::$mix_hash"
- name: Cache deps
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-v2-${{ steps.set_vars.outputs.mix_hash }}
restore-keys: |
${{ runner.os }}-mix-
- name: Cache _build folder
uses: actions/cache@v2
with:
path: _build
key: ${{ runner.os }}-build-v2-${{ steps.set_vars.outputs.mix_hash }}
restore-keys: |
${{ runner.os }}-build-v2-
- name: Install Dependencies
run: |
mix deps.get
- name: Check format
run: |
mix format --check-formatted
- name: Run Dialyzer
run: |
mix dialyzer
- name: Run tests
run: |
mix test