-
Notifications
You must be signed in to change notification settings - Fork 7
50 lines (43 loc) · 1.27 KB
/
elixir.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
name: Elixir CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup elixir
uses: actions/setup-elixir@v1
with:
elixir-version: 1.9.4 # Define the elixir version [required]
otp-version: 22.2 # Define the OTP version [required]
- name: Check formatting
run: mix format --check-formatted
- name: Cache Dependencies
id: mix-cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: Install Dependencies
if: steps.mix-cache.outputs.cache-hit != 'true'
run: mix deps.get
- name: Cache Build
id: build-cache
uses: actions/cache@v2
with:
path: |
_build
!_build/*/lib/signal_tower
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: Compile Dependencies
run: mix deps.compile
- name: Compile and check for warnings
run: mix compile --warnings-as-errors
- name: Run Tests
run: mix test
- name: Run dialyzer static code analysis
run: mix dialyzer