-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (50 loc) · 1.28 KB
/
ci.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
---
name: Endo | CI checks
on:
pull_request:
branches:
- main
push:
branches:
- main
concurrency:
group: ci-${{github.ref}}
cancel-in-progress: true
jobs:
lint-and-test:
runs-on: ubuntu-latest
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
strategy:
matrix:
include:
- otp: "26.1"
elixir: "1.15.7"
- otp: "24.2"
elixir: "1.13.4"
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: endo_repo
POSTGRES_PORT: 5432
steps:
- name: Checkout Github repo
uses: actions/[email protected]
- name: Setup BEAM Env
uses: erlef/[email protected]
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: Setup Cache
uses: actions/[email protected]
id: mix-cache
with:
path: |
deps
_build
priv/plts
key: ${{ hashFiles('mix.lock') }}-${{ matrix.elixir }}-${{ matrix.otp }}
- if: steps.mix-cache.outputs.cache-hit != 'true'
run: mkdir -p priv/plts; mix deps.get; mix deps.compile
- run: docker-compose up -d
- run: mix lint
- run: MIX_ENV=test mix do ecto.create, ecto.migrate, test