[CI] Add back install into before_script: parts

Because cache is really unreliable

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-01-14 15:07:59 +01:00
parent a5416aae5c
commit eef4ea178d
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773

View File

@ -50,6 +50,8 @@ install:
lint-elixir: lint-elixir:
stage: check stage: check
before_script:
- mix deps.get
script: script:
- export EXITVALUE=0 - export EXITVALUE=0
- mix credo --strict -a || export EXITVALUE=1 - mix credo --strict -a || export EXITVALUE=1
@ -57,9 +59,11 @@ lint-elixir:
- exit $EXITVALUE - exit $EXITVALUE
lint-front: lint-front:
image: node:14
stage: check stage: check
before_script: before_script:
- export EXITVALUE=0 - export EXITVALUE=0
- yarn --cwd "js" install --frozen-lockfile
- cd js - cd js
script: script:
- yarn run lint || export EXITVALUE=1 - yarn run lint || export EXITVALUE=1
@ -68,10 +72,12 @@ lint-front:
build-frontend: build-frontend:
stage: build stage: build
image: node:14
before_script: before_script:
- apt update - apt update
- apt install -y --no-install-recommends python build-essential webp imagemagick gifsicle jpegoptim optipng pngquant - apt install -y --no-install-recommends python build-essential webp imagemagick gifsicle jpegoptim optipng pngquant
script: script:
- yarn --cwd "js" install --frozen-lockfile
- yarn --cwd "js" run build - yarn --cwd "js" run build
artifacts: artifacts:
expire_in: 5 days expire_in: 5 days
@ -82,6 +88,8 @@ build-frontend:
deps: deps:
stage: check stage: check
before_script:
- mix deps.get
script: script:
- export EXITVALUE=0 - export EXITVALUE=0
- mix hex.outdated || export EXITVALUE=1 - mix hex.outdated || export EXITVALUE=1
@ -99,6 +107,7 @@ exunit:
variables: variables:
MIX_ENV: test MIX_ENV: test
before_script: before_script:
- mix deps.get
- mix ecto.create - mix ecto.create
- mix ecto.migrate - mix ecto.migrate
script: script:
@ -114,6 +123,8 @@ jest:
stage: test stage: test
needs: needs:
- lint-front - lint-front
before_script:
- yarn --cwd "js" install --frozen-lockfile
script: script:
- yarn --cwd "js" run test:unit --no-color --ci --reporters=default --reporters=jest-junit - yarn --cwd "js" run test:unit --no-color --ci --reporters=default --reporters=jest-junit
artifacts: artifacts: