-
Notifications
You must be signed in to change notification settings - Fork 10
45 lines (45 loc) · 1.36 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
name: Elixir CI
on: push
jobs:
build:
name: Build, test and dialyzer
runs-on: ubuntu-latest
strategy:
matrix:
elixir: [">1.12"]
otp: [">22"]
steps:
- uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }} # Define the elixir version [required]
otp-version: ${{ matrix.otp }} # Define the OTP version [required]
- name: Restore dependencies cache
uses: actions/cache@v2
id: cache-mix
with:
path: |
deps
_build
priv/plts
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles('**/mix.lock') }}
- name: Install and compile deps and plt
if: steps.cache-mix.outputs.cache-hit != 'true'
run: |
mkdir -p priv/plts
mix local.rebar --force
mix local.hex --force
mix deps.get
mix deps.compile
mix dialyzer --plt
- name: Check compile time warnings
env:
MIX_ENV: test
run: mix compile --warnings-as-errors
- name: Run test
run: mix test
- name: Make sure that compiled version works without build json available
run: rm _build/test/lib/ex_cldr/priv/cldr/territory_containment.json && mix test
- name: Run dialyzer
run: mix dialyzer --no-check