Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2019-10-07 10:59:21 +02:00
parent c7cf89c473
commit d2035202e3
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -20,32 +20,43 @@ variables:
GEOLITE_CITIES_PATH: "/usr/share/GeoIP/GeoLite2-City.mmdb" GEOLITE_CITIES_PATH: "/usr/share/GeoIP/GeoLite2-City.mmdb"
MOBILIZON_INSTANCE_REGISTRATIONS_OPEN: "true" MOBILIZON_INSTANCE_REGISTRATIONS_OPEN: "true"
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- ~/.cache/
- build/
- deps/
- js/node_modules
lint: lint:
stage: check stage: check
script: script:
- export EXITVALUE=0
- mix deps.get - mix deps.get
- mix credo list - mix credo -a || export EXITVALUE=1
- mix format --check-formatted --dry-run - mix format --check-formatted --dry-run || export EXITVALUE=1
- cd js - cd js
- yarn install - yarn install
- yarn run lint - yarn run lint || export EXITVALUE=1
cache: - yarn run build
- cd ../
- exit $EXITVALUE
artifacts:
expire_in: 1 day
when: on_success
paths: paths:
- deps - priv/static
- js/node_modules
deps: deps:
stage: check stage: check
script: script:
- export EXITVALUE=0
- mix deps.get - mix deps.get
- mix hex.outdated - mix hex.outdated || export EXITVALUE=1
- cd js - cd js
- yarn outdated - yarn outdated || export EXITVALUE=1
- exit $EXITVALUE
allow_failure: true allow_failure: true
cache:
paths:
- deps
- js/node_modules
exunit: exunit:
stage: test stage: test
@ -53,15 +64,17 @@ exunit:
- name: mdillon/postgis:11 - name: mdillon/postgis:11
alias: postgres alias: postgres
before_script: before_script:
- cd js
- yarn install
- yarn run build
- cd ../
- mix deps.get - mix deps.get
- MIX_ENV=test mix ecto.create - MIX_ENV=test mix ecto.create
- MIX_ENV=test mix ecto.migrate - MIX_ENV=test mix ecto.migrate
dependencies:
- lint
script: script:
- mix coveralls - mix coveralls
cache:
paths:
- deps
- _build
cypress: cypress:
stage: test stage: test
@ -98,10 +111,6 @@ pages:
- yarn install - yarn install
- yarn run styleguide:build - yarn run styleguide:build
- mv styleguide ../public/frontend - mv styleguide ../public/frontend
cache:
paths:
- deps
- js/node_modules
only: only:
- master - master
artifacts: artifacts: