-
Notifications
You must be signed in to change notification settings - Fork 5
66 lines (59 loc) · 1.96 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Elixir CI Workflow 🧪
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
elixir_ci:
name: Elixir CI 🧪
runs-on: ubuntu-latest
env:
MIX_ENV: test
steps:
- name: Checkout repository 🛎️
uses: actions/checkout@v2
- name: Install Erlang/OTP + Elixir 🏗️
id: setup-beam
uses: erlef/setup-beam@v1
with:
otp-version: '24.0' # version range or exact (required)
elixir-version: '1.12.0' # version range or exact (required)
# install-hex: true (default)
# install-rebar: true (default)
# outputs: ${steps.setup-beam.outputs.(opt, elixir, rebar3)-version} (exact version installed)
- name: Restore dependency/build cache 🗃️
uses: actions/cache@v2
with:
path: |
deps
_build
# cache key is hierarchical: OS, otp-version, elixir-version, mix.lock
key: ${{ runner.os }}-mix-${{ steps.setup-beam.outputs.otp-version }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ hashFiles('**/mix.lock') }}
# restore keys are tried on cache misses, and only match the key prefix
restore-keys: |
${{ runner.os }}-mix-${{ steps.setup-beam.outputs.otp-version }}-${{ steps.setup-beam.outputs.elixir-version }}-
${{ runner.os }}-mix-${{ steps.setup-beam.outputs.otp-version }}-
${{ runner.os }}-mix-
- name: Dependencies 🔗
run: |
mix deps.get
mix deps.compile
- name: Code 🔧
run: |
mix format --check-formatted
mix compile --warnings-as-errors
mix credo --strict
mix dialyzer
mix docs
- name: Test 🦺
run: |
mix test --warnings-as-errors --cover --export-coverage default
mix test.coverage
- name: Artifacts 📚
uses: actions/upload-artifact@v2
with:
name: doc-cover
path: |
doc
cover