-
Notifications
You must be signed in to change notification settings - Fork 6
54 lines (51 loc) · 1.17 KB
/
elixir.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: Elixir CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
services:
db:
image: postgres:13
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: animina_test
ports: ['5432:5432']
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Elixir and Erlang
uses: erlef/setup-beam@v1
with:
otp-version: auto
elixir-version: auto
fetch-deps: true
install-hex: true
install-rebar: true
- name: Install Dependencies
run: mix deps.get
- name: Create and Migrate Database
env:
MIX_ENV: test
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: postgres
PGDATABASE: animina_test
run: |
mix ecto.create
mix ecto.migrate
- name: Run Tests
env:
MIX_ENV: test
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: postgres
PGDATABASE: animina_test
run: mix test