-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (41 loc) · 1.06 KB
/
test.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
---
name: Test and check format
on:
workflow_call:
push:
branches: '**'
env:
OTP_VERSION: 26.2.1
ELIXIR_VERSION: 1.16.0
jobs:
test:
runs-on: ubuntu-latest
env:
MIX_ENV: "test"
steps:
- uses: actions/checkout@v3
- name: Install erlang/elixir
uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
version-type: 'strict'
- name: Cache dependencies
id: cache-dependencies
uses: actions/cache@v3
with:
path: |
deps
_build
key: ${{ runner.os }}-deps-${{ hashFiles('mix.lock') }}
- name: Download dependencies
run: mix deps.get
- name: Compile dependencies
# if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: mix compile --warnings-as-errors
- name: Check format (lint)
run: mix format --check-formatted
- name: Static analysis
run: mix credo
- name: Run tests
run: mix test