-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 959 Bytes
/
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
name: Elixir CI
on:
push:
pull_request:
jobs:
build:
name: Build, test and lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-elixir@885971a72ed1f9240973bd92ab57af8c1aa68f24
with:
elixir-version: '1.12.0'
otp-version: '24.0'
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Check if code is formatted
run: mix format --check-formatted
- name: Compiler
run: mix compile --warnings-as-errors
- name: Check deprecated code
run: mix xref deprecated --abort-if-any
- name: Check unreachable code
run: mix xref unreachable --abort-if-any
- name: Run credo
run: mix credo --strict