This commit is contained in:
dbroqua 2020-02-11 20:23:48 +01:00
parent 5f50c568ed
commit bc6adfe920

View File

@ -1,8 +1,5 @@
image: node:latest image: node:latest
services:
- postgres:latest
variables: variables:
NODE_ENV: "ci" NODE_ENV: "ci"
POSTGRES_DB: "postgres" POSTGRES_DB: "postgres"
@ -10,31 +7,35 @@ variables:
POSTGRES_PASSWORD: "postgres" POSTGRES_PASSWORD: "postgres"
stages: stages:
- build # - build
- migrate # - migrate
- test - test
cache: cache:
paths: paths:
- node_modules/ - node_modules/
# install:
install: # stage: build
stage: build # script:
script: # - yarn install
- yarn install # artifacts:
artifacts: # paths:
paths: # - node_modules/
- node_modules/ # migrate:
# stage: migrate
migrate: # script:
stage: migrate # - ./node_modules/.bin/sequelize db:migrate
script:
- ./node_modules/.bin/sequelize db:migrate
testing: testing:
stage: test stage: test
services:
- postgres:latest
script: script:
- yarn install
- ./node_modules/.bin/sequelize db:migrate
- yarn test --ci --collectCoverage=true - yarn test --ci --collectCoverage=true
artifacts: artifacts:
reports: reports:
junit: junit.xml junit: junit.xml
tags:
- docker