-
Notifications
You must be signed in to change notification settings - Fork 13
69 lines (58 loc) · 1.52 KB
/
compile-format.yaml
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
name: compile-format
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
- "develop"
env:
MIX_ENV: test
jobs:
deps:
name: install-deps
runs-on: ubuntu-22.04
strategy:
matrix:
elixir: ['1.17.1']
otp: ['27']
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: Retrieve Cached Dependencies
uses: actions/cache@v4
id: mix-cache
with:
path: |
deps
_build
priv/plts
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }}
- name: Install Dependencies
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
mkdir -p priv/plts
mix local.rebar --force
mix local.hex --force
mix deps.get
mix deps.compile
- name: Check Code Format
run: mix format --check-formatted
- name: Run Credo (SCA)
run: mix credo
# - name: Run Dialyzer (SCA)
# run: mix dialyzer --plt
# - name: Run test
# run: mix test --trace --slowest 10