.gitlab-ci.yml 829 Bytes
Newer Older
rinpatch's avatar
rinpatch committed
1
image: elixir:1.8.1
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
  - test
22
  - analysis
lain's avatar
lain committed
23
24

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

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

lain's avatar
lain committed
37
38
39
unit-testing:
  stage: test
  script:
lain's avatar
lain committed
40
    - mix test --trace --preload-modules
41
42
43
44

analysis:
  stage: analysis
  script:
45
    - mix credo --strict --only=warnings,todo,fixme,consistency,readability