-
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (63 loc) · 1.77 KB
/
elixir-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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
elixir: ["1.10.4", "1.11.0"]
otp: ["23.0.3"]
steps:
- uses: actions/checkout@v2
- name: Test Elixir
uses: erlef/setup-elixir@v1
with:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Setup local config
run: echo "import Config" > config/.secret.exs
- name: Install dependencies
run: mix deps.get
- name: Compile app
run: mix compile --force --warnings-as-errors
env:
MIX_ENV: "test"
- name: Run tests
run: mix test
analyse:
name: Static analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-elixir@v1
with:
elixir-version: "1.11.0"
otp-version: "23"
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Setup local config
run: echo "import Config" > config/.secret.exs
- name: Install dependencies
run: mix deps.get
- name: Compile app
run: mix compile --force --warnings-as-errors
- name: Run Credo
run: mix credo
- name: Check formatting
run: mix format --check-formatted