Merge branch 'ci-stages' into 'master'
Introduce CI stages (front / back), mix format runs in parallel Closes #41 See merge request framasoft/mobilizon!30
This commit is contained in:
commit
e3a8343112
@ -1,8 +1,8 @@
|
|||||||
image: tcitworld/mobilizon-ci
|
image: tcitworld/mobilizon-ci
|
||||||
|
|
||||||
services:
|
stages:
|
||||||
- name: mdillon/postgis:10
|
- front
|
||||||
alias: postgres
|
- back
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
MIX_ENV: "test"
|
MIX_ENV: "test"
|
||||||
@ -12,24 +12,48 @@ variables:
|
|||||||
POSTGRES_HOST: postgres
|
POSTGRES_HOST: postgres
|
||||||
GEOLITE_CITIES_PATH: "/usr/share/GeoIP/GeoLite2-City.mmdb"
|
GEOLITE_CITIES_PATH: "/usr/share/GeoIP/GeoLite2-City.mmdb"
|
||||||
|
|
||||||
cache:
|
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
|
||||||
|
|
||||||
|
elixir_format:
|
||||||
|
stage: back
|
||||||
|
before_script:
|
||||||
|
- mix deps.get
|
||||||
|
script:
|
||||||
|
- mix format --check-formatted --dry-run
|
||||||
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- deps
|
- deps
|
||||||
- _build
|
|
||||||
- .rebar3
|
|
||||||
- ~/.mix
|
|
||||||
- ~/.hex
|
|
||||||
- js/node_modules
|
|
||||||
|
|
||||||
before_script:
|
mix:
|
||||||
- cd js && npm install && npm run build && cd ../
|
stage: back
|
||||||
- mix local.rebar --force
|
services:
|
||||||
- mix local.hex --force
|
- name: mdillon/postgis:10
|
||||||
|
alias: postgres
|
||||||
|
dependencies:
|
||||||
|
- js
|
||||||
|
before_script:
|
||||||
- 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
|
||||||
|
|
||||||
mix:
|
|
||||||
script:
|
script:
|
||||||
- mix format --check-formatted --dry-run
|
|
||||||
- mix coveralls
|
- mix coveralls
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- deps
|
||||||
|
- _build
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
FROM elixir:latest
|
FROM elixir:latest
|
||||||
|
LABEL maintainer="Thomas Citharel <tcit@tcit.fr>"
|
||||||
|
|
||||||
|
ENV REFRESHED_AT=2018-12-18
|
||||||
RUN apt-get update -yq && apt-get install -yq build-essential inotify-tools postgresql-client git curl gnupg
|
RUN apt-get update -yq && apt-get install -yq build-essential inotify-tools postgresql-client git curl gnupg
|
||||||
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash && apt-get install nodejs -yq
|
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash && apt-get install nodejs -yq
|
||||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
RUN mix local.hex --force && mix local.rebar --force
|
||||||
RUN curl http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz --output GeoLite2-City.tar.gz -s && tar zxf GeoLite2-City.tar.gz && mkdir -p /usr/share/GeoIP && mv GeoLite2-City_*/GeoLite2-City.mmdb /usr/share/GeoIP/GeoLite2-City.mmdb
|
RUN curl http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz --output GeoLite2-City.tar.gz -s && tar zxf GeoLite2-City.tar.gz && mkdir -p /usr/share/GeoIP && mv GeoLite2-City_*/GeoLite2-City.mmdb /usr/share/GeoIP/GeoLite2-City.mmdb
|
Loading…
Reference in New Issue
Block a user