-
Notifications
You must be signed in to change notification settings - Fork 15
70 lines (66 loc) · 1.85 KB
/
development.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
66
67
68
69
70
name: Kanta Development
on:
push:
branches: ["develop"]
pull_request:
branches: ["develop"]
env:
MIX_ENV: dev
permissions:
contents: read
jobs:
build:
name: OS ${{matrix.os}} / Elixir ${{matrix.elixir}} / OTP ${{matrix.otp}}
strategy:
matrix:
elixir: ['1.14', '1.15', '1.16', '1.17']
otp: ['24', '25', '26', '27']
os: [ubuntu-24.04]
exclude:
# Elixir 1.14
- elixir: '1.14'
otp: '27'
# Elixir 1.15
- elixir: '1.15'
otp: '27'
# Elixir 1.16
- elixir: '1.16'
otp: '27'
# Elixir 1.17
- elixir: '1.17'
otp: '24'
runs-on: ${{matrix.os}}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: Restore dependencies cache
uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Set up Postgres
run: |
sudo apt-get update
sudo apt-get install -y postgresql
sudo service postgresql start
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'postgres';"
- name: Install dependencies
run: mix deps.get
- name: Create database
run: mix do ecto.create, ecto.migrate
- name: Compile code
run: mix compile --warnings-as-errors
- name: Check Formatting
run: mix format --check-formatted
- name: Dialyzer
run: mix dialyzer -Wno_match --format short 2>&1
- name: Credo
run: mix credo
- name: Run tests
run: MIX_ENV=test mix test