d5b4630009bb0fdf203d2c425a8f8b013b1a2ac4
[akkoma] / .gitlab-ci.yml
1 image: elixir:1.8.1
2
3 services:
4 - name: postgres:9.6.2
5 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
6
7 variables:
8 POSTGRES_DB: pleroma_test
9 POSTGRES_USER: postgres
10 POSTGRES_PASSWORD: postgres
11 DB_HOST: postgres
12 MIX_ENV: test
13
14 cache:
15 key: ${CI_COMMIT_REF_SLUG}
16 paths:
17 - deps
18 - _build
19 stages:
20 - lint
21 - test
22 - analysis
23
24 before_script:
25 - mix local.hex --force
26 - mix local.rebar --force
27 - mix deps.get
28 - mix compile --force
29 - mix ecto.create
30 - mix ecto.migrate
31
32 lint:
33 stage: lint
34 script:
35 - mix format --check-formatted
36
37 unit-testing:
38 stage: test
39 script:
40 - mix test --trace --preload-modules
41
42 analysis:
43 stage: analysis
44 script:
45 - mix credo list --only=warnings,todo,fixme,consistency