.gitlab-ci.yml 701 Bytes
Newer Older
lain's avatar
lain committed
1
image: elixir:1.7.2
lain's avatar
lain committed
2
3

services:
lain's avatar
lain committed
4
  - name: postgres:9.6.2
lain's avatar
lain committed
5
    command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
lain's avatar
lain committed
6
7
8

variables:
  POSTGRES_DB: pleroma_test
Roger Braun's avatar
Roger Braun committed
9
10
  POSTGRES_USER: postgres
  POSTGRES_PASSWORD: postgres
lain's avatar
lain committed
11
  DB_HOST: postgres
12
  MIX_ENV: test
13

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

before_script:
lain's avatar
lain committed
24
25
  - mix local.hex --force
  - mix local.rebar --force
lain's avatar
lain committed
26
  - mix deps.get
27
  - mix compile --force
28
29
  - mix ecto.create
  - mix ecto.migrate
lain's avatar
lain committed
30

lain's avatar
lain committed
31
32
33
lint:
  stage: lint
  script:
34
    - mix format --check-formatted
lain's avatar
lain committed
35

lain's avatar
lain committed
36
37
38
unit-testing:
  stage: test
  script:
lain's avatar
lain committed
39
    - mix test --trace --preload-modules