-
Notifications
You must be signed in to change notification settings - Fork 51
73 lines (68 loc) · 2.28 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
67
68
69
70
71
72
73
name: Elixir CI
on:
push:
branches: [master, ci]
pull_request:
branches: [master]
jobs:
build:
name: Build and test
runs-on: ubuntu-20.04
env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MIX_ENV: test
strategy:
matrix:
include:
- elixir: '1.8'
otp: '22.3'
- elixir: '1.13'
otp: '24.3'
- elixir: '1.14'
otp: '25.2'
steps:
- uses: actions/checkout@v3
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
# - name: Restore dependency cache
# uses: actions/cache@v3.3.1
# id: deps-cache
# with:
# path: deps
# key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles('**/mix.lock') }}
# restore-keys: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-
# - name: Restore build cache
# uses: actions/cache@v3.3.1
# with:
# path: _build
# key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-build-${{ hashFiles('**/mix.lock') }}
# restore-keys: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-build-
# - name: Restore plt cache
# uses: actions/cache@v3.3.1
# id: plt-cache
# with:
# path: priv/plts
# key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts-${{ hashFiles('**/mix.lock') }}
# restore-keys: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts-
- name: Install dependencies
# if: steps.deps-cache.outputs.cache-hit != 'true'
run: mix deps.get
- name: Compile application
run: mix compile
# - name: Create plts
# if: steps.plt-cache.outputs.cache-hit != 'true'
# run: |
# mkdir -p priv/plts
# mix dialyzer --plt
# - name: Run static code analysis (dialyzer)
# run: mix dialyzer --no-check
# - name: Run static code analysis (credo)
# run: mix credo --strict
- name: Run tests
run: mix test
- name: Run tests and coverage
if: matrix.elixir == '1.14' && matrix.otp == '25.2'
run: mix coveralls.github