.gitlab-ci.yml 606 Bytes
Newer Older
lain's avatar
lain committed
1
image: elixir:1.7.2
lain's avatar
lain committed
2
3
4
5
6
7

services:
  - postgres:9.6.2

variables:
  POSTGRES_DB: pleroma_test
Roger Braun's avatar
Roger Braun committed
8
9
  POSTGRES_USER: postgres
  POSTGRES_PASSWORD: postgres
lain's avatar
lain committed
10
  DB_HOST: postgres
11

rinpatch's avatar
rinpatch committed
12
cache:
13
  key: ${CI_COMMIT_REF_SLUG}
rinpatch's avatar
rinpatch committed
14
15
  paths:
          - deps
Rin Toshaka's avatar
Rin Toshaka committed
16
          - _build
lain's avatar
lain committed
17
stages:
lain's avatar
lain committed
18
  - lint
lain's avatar
lain committed
19
20
21
  - test

before_script:
lain's avatar
lain committed
22
23
  - mix local.hex --force
  - mix local.rebar --force
lain's avatar
lain committed
24
  - mix deps.get
25
  - mix compile --force
lain's avatar
lain committed
26
27
28
  - MIX_ENV=test mix ecto.create
  - MIX_ENV=test mix ecto.migrate

lain's avatar
lain committed
29
30
31
32
33
lint:
  stage: lint
  script:
    - MIX_ENV=test mix format --check-formatted

lain's avatar
lain committed
34
35
36
unit-testing:
  stage: test
  script:
lain's avatar
lain committed
37
    - MIX_ENV=test mix test --trace