ecb6d20d60
Signed-off-by: Thomas Citharel <tcit@tcit.fr> Nicer docs No 3rd stage Add mix.deps get before docs Add :ex_doc on test env so that it runs into CI
109 lines
1.8 KiB
YAML
109 lines
1.8 KiB
YAML
image: tcitworld/mobilizon-ci
|
|
|
|
stages:
|
|
- front
|
|
- back
|
|
|
|
variables:
|
|
MIX_ENV: "test"
|
|
# DB Variables for Postgres / Postgis
|
|
POSTGRES_DB: mobilizon_test
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: ""
|
|
POSTGRES_HOST: postgres
|
|
# DB Variables for Mobilizon
|
|
MOBILIZON_DATABASE_USERNAME: $POSTGRES_USER
|
|
MOBILIZON_DATABASE_PASSWORD: $POSTGRES_PASSWORD
|
|
MOBILIZON_DATABASE_DBNAME: $POSTGRES_DB
|
|
MOBILIZON_DATABASE_HOST: $POSTGRES_HOST
|
|
GEOLITE_CITIES_PATH: "/usr/share/GeoIP/GeoLite2-City.mmdb"
|
|
|
|
js:
|
|
stage: front
|
|
before_script:
|
|
- cd js
|
|
- npm install
|
|
script:
|
|
- npm run build
|
|
after_script:
|
|
- cd ../
|
|
cache:
|
|
paths:
|
|
- js/node_modules
|
|
artifacts:
|
|
paths:
|
|
- priv/static
|
|
untracked: false
|
|
expire_in: 30 days
|
|
|
|
|
|
js_deps:
|
|
stage: front
|
|
before_script:
|
|
- cd js
|
|
- npm install
|
|
- npm install -g npm-check-updates
|
|
script:
|
|
- ncu --error-level 2
|
|
after_script:
|
|
- cd ../
|
|
cache:
|
|
paths:
|
|
- js/node_modules
|
|
allow_failure: true
|
|
|
|
elixir_check:
|
|
stage: back
|
|
before_script:
|
|
- mix deps.get
|
|
script:
|
|
- mix credo list
|
|
- mix format --check-formatted --dry-run
|
|
cache:
|
|
paths:
|
|
- deps
|
|
|
|
elixir_deps:
|
|
stage: back
|
|
before_script:
|
|
- mix deps.get
|
|
script:
|
|
- mix hex.outdated
|
|
allow_failure: true
|
|
cache:
|
|
paths:
|
|
- deps
|
|
|
|
doc:
|
|
stage: back
|
|
before_script:
|
|
- mix deps.get
|
|
script:
|
|
- mix docs
|
|
- mv doc public
|
|
cache:
|
|
paths:
|
|
- deps
|
|
artifacts:
|
|
expire_in: 1 hour
|
|
paths:
|
|
- public
|
|
|
|
mix:
|
|
stage: back
|
|
services:
|
|
- name: mdillon/postgis:10
|
|
alias: postgres
|
|
dependencies:
|
|
- js
|
|
before_script:
|
|
- mix deps.get
|
|
- MIX_ENV=test mix ecto.create
|
|
- MIX_ENV=test mix ecto.migrate
|
|
script:
|
|
- mix coveralls
|
|
cache:
|
|
paths:
|
|
- deps
|
|
- _build
|