-
-
Notifications
You must be signed in to change notification settings - Fork 14
91 lines (84 loc) · 2.39 KB
/
main.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: MJML EEx CI
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SHELL: sh
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
static_analysis:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: "1.15.0"
otp-version: "26.2"
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-v2-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-v2-
- name: Install dependencies
run: mix deps.get
- name: Restore PLT cache
uses: actions/cache@v2
with:
path: priv/plts
key: ${{ runner.os }}-mix-v2-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-v2-
- name: Mix Formatter
run: mix format --check-formatted
- name: Check for compiler warnings
run: mix compile --warnings-as-errors
- name: Credo strict checks
run: mix credo --strict
- name: Doctor documentation checks
run: mix doctor
unit_test:
name: Run ExUnit tests
runs-on: ubuntu-latest
strategy:
matrix:
version:
- otp: 26.2
elixir: 1.15.8
- otp: 26.2
elixir: 1.16.3
- otp: 27.0
elixir: 1.17.0-rc.1
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.version.elixir }}
otp-version: ${{ matrix.version.otp }}
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 15
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-v2-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-v2-
- name: Install dependencies
run: mix deps.get
- name: Install Node MJML compiler
run: npm install -g mjml
- name: Set MJML path env var
run: echo "$(npm bin)" >> $GITHUB_PATH
- name: ExUnit tests
env:
MIX_ENV: test
SHELL: /bin/bash
run: mix coveralls.github