-
Notifications
You must be signed in to change notification settings - Fork 19
61 lines (53 loc) · 1.39 KB
/
test.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
name: Test Suite
on:
push:
branches:
- master
- "pr-*"
tags:
- "*"
pull_request:
types: [opened, synchronize]
jobs:
test:
strategy:
matrix:
elixir: ['1.13', '1.14', '1.15']
runs-on: ubuntu-latest
container:
image: elixir:${{ matrix.elixir }}-otp-25-alpine
env:
POSTGRES_HOST: postgres
MIX_ENV: test
services:
postgres:
image: postgres:9.6.2
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: fsmx_test
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- name: Setup Deps Cache
uses: actions/cache@v1
with:
path: deps
key: v1-deps-${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
v1-deps-${{ runner.os }}-
- name: Setup Build Cache
uses: actions/cache@v1
with:
path: _build
key: v1-build-${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
v1-build-${{ runner.os }}-
- run: mix local.hex --force
- run: mix local.rebar --force
- run: mix deps.get
- run: mix deps.compile
- run: mix compile
- run: MIX_ENV=test mix ecto.migrate
- run: mix test