-
Notifications
You must be signed in to change notification settings - Fork 30
52 lines (48 loc) · 1.04 KB
/
ci.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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
env:
MIX_ENV: test
strategy:
fail-fast: false
matrix:
include:
- elixir: 1.13.1
otp: 24.2
steps:
- uses: actions/checkout@v1
- uses: erlef/setup-elixir@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: Cache build artifacts
uses: actions/cache@v2
with:
path: |
~/.hex
~/.mix
deps
_build
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
- name: Install Dependencies
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: Compile Deps
run: mix deps.compile
- name: Compile
run: mix compile --warnings-as-errors
- name: Formatting
run: MIX_ENV=test mix format --check-formatted
- name: Run Tests
run: mix test