ability to set and reset avatar, profile banner and backgroud in Mastodon API
[akkoma] / .gitlab-ci.yml
1 image: elixir:1.8.1
2
3 variables:
4 POSTGRES_DB: pleroma_test
5 POSTGRES_USER: postgres
6 POSTGRES_PASSWORD: postgres
7 DB_HOST: postgres
8 MIX_ENV: test
9
10 cache:
11 key: ${CI_COMMIT_REF_SLUG}
12 paths:
13 - deps
14 - _build
15 stages:
16 - build
17 - test
18 - deploy
19
20 before_script:
21 - mix local.hex --force
22 - mix local.rebar --force
23
24 build:
25 stage: build
26 script:
27 - mix deps.get
28 - mix compile --force
29
30 docs-build:
31 stage: build
32 only:
33 - master@pleroma/pleroma
34 - develop@pleroma/pleroma
35 variables:
36 MIX_ENV: dev
37 script:
38 - mix deps.get
39 - mix compile
40 - mix docs
41 artifacts:
42 paths:
43 - priv/static/doc
44
45 unit-testing:
46 stage: test
47 services:
48 - name: lainsoykaf/postgres-with-rum
49 alias: postgres
50 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
51 script:
52 - mix deps.get
53 - mix ecto.create
54 - mix ecto.migrate
55 - mix test --trace --preload-modules
56 - mix coveralls
57
58 unit-testing-rum:
59 stage: test
60 services:
61 - name: lainsoykaf/postgres-with-rum
62 alias: postgres
63 command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
64 variables:
65 RUM_ENABLED: "true"
66 script:
67 - mix deps.get
68 - mix ecto.create
69 - mix ecto.migrate
70 - "mix ecto.migrate --migrations-path priv/repo/optional_migrations/rum_indexing/"
71 - mix test --trace --preload-modules
72
73 lint:
74 stage: test
75 script:
76 - mix format --check-formatted
77
78 analysis:
79 stage: test
80 script:
81 - mix deps.get
82 - mix credo --strict --only=warnings,todo,fixme,consistency,readability
83
84 docs-deploy:
85 stage: deploy
86 image: alpine:3.9
87 only:
88 - master@pleroma/pleroma
89 - develop@pleroma/pleroma
90 before_script:
91 - apk update && apk add openssh-client rsync
92 script:
93 - mkdir -p ~/.ssh
94 - echo "${SSH_HOST_KEY}" > ~/.ssh/known_hosts
95 - eval $(ssh-agent -s)
96 - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
97 - rsync -hrvz --delete -e "ssh -p ${SSH_PORT}" priv/static/doc/ "${SSH_USER_HOST_LOCATION}/${CI_COMMIT_REF_NAME}"