-
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (63 loc) · 1.62 KB
/
ci-build.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
name: Build and static analyze
on:
push:
branches:
- main
- develop
pull_request:
branches: [ develop ]
jobs:
build:
runs-on: ubuntu-latest
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
strategy:
fail-fast: false
matrix:
include:
- elixir: '1.12'
otp: '24'
- elixir: '1.13'
otp: '25'
- elixir: '1.14'
otp: '25'
- elixir: '1.15'
otp: '26'
- elixir: '1.16'
otp: '26'
- elixir: '1.17'
otp: '27'
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: Fetch dependencies
run: mix deps.get --only prod
- name: Compile
run: MIX_ENV=prod mix compile
static-analysis:
runs-on: ubuntu-latest
name: Static analysis
steps:
- uses: actions/checkout@v4
- name: Set mix.lock file hash
run: |
mix_hash="${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}"
echo "mix_hash=$mix_hash" >> $GITHUB_ENV
- name: Cache PLT files
uses: actions/cache@v4
with:
path: |
_build/dev/*.plt
_build/dev/*.plt.hash
key: plt-cache-${{ env.mix_hash }}
restore-keys: |
plt-cache-
- name: Run `mix check`
uses: erlef/setup-beam@v1
with:
otp-version: '27'
elixir-version: '1.17'
- run: mix do deps.get, compile
- run: mix check