-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 1.02 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
name: CI
on: push
env:
MIX_ENV: test
jobs:
verify:
runs-on: ubuntu-latest
services:
db:
image: postgres:12
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: jumubase_test
ports: ["5432:5432"]
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-elixir@885971a72ed1f9240973bd92ab57af8c1aa68f24
with:
otp-version: "24.0.5"
elixir-version: "1.12.2"
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: |
mix deps.get
npm install --prefix assets
- name: Check formatting
run: mix format --check-formatted
- name: Run tests
run: mix test