-
Notifications
You must be signed in to change notification settings - Fork 4
56 lines (56 loc) · 1.52 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
54
55
56
name: CI
on: [push]
jobs:
mix_test:
name: mix test (Elixir ${{ matrix.elixir }} OTP ${{ matrix.otp }})
strategy:
matrix:
elixir: ["1.7.4", "1.8.2", "1.9.4", "1.10.2"]
include:
- elixir: "1.7.4"
otp: "20.3.8.26"
- elixir: "1.8.2"
otp: "21.3.8.14"
- elixir: "1.9.4"
otp: "22.3"
- elixir: "1.10.2"
otp: "22.3"
runs-on: ubuntu-latest
services:
db:
image: postgres:10.14-alpine
ports: ['5432:5432']
env:
POSTGRES_USER: ecto_enum
POSTGRES_PASSWORD: password
POSTGRES_DB: db_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- name: Install Dependencies
run: mix deps.get
- name: Run Tests
env:
POSTGRES_URL: "postgres://ecto_enum:password@localhost:5432/db_test"
run: mix test
mix_format:
name: mix format (Elixir 1.9.4 OTP 22.3)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: "22.3"
elixir-version: "1.9.4"
- name: Install Dependencies
run: mix deps.get
- name: Run Formatter
run: mix format --check-formatted