-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (53 loc) · 1.58 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
53
54
55
56
57
58
59
60
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
env:
MIX_ENV: test
ELIXIR_VERSION: 1.13.4
ERLANG_VERSION: 25.0
jobs:
build:
name: Tests & Checks
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@5304e04ea2b355f03681464e683d92e3b2f18451
with:
elixir-version: ${{ env.ELIXIR_VERSION }}
otp-version: ${{ env.ERLANG_VERSION }}
- name: Restore dependencies cache
uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.ERLANG_VERSION }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- uses: actions/cache@v4
name: Restore/Cache _plts
id: dialyzer-plts-files
with:
path: _plts/
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.ERLANG_VERSION }}-dialyzer-plts-files-01-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.ERLANG_VERSION }}-dialyzer-plts-files-01-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: Install dependencies
run: mix deps.get
- name: Run tests
run: |
mix compile --warnings-as-errors
mix test
- name: Run formatter
run: |
mix format --check-formatted
- name: Run Credo
run: |
mix credo
- name: Run dialyzer
run: |
mkdir -p _plts
mix dialyzer