42 lines
596 B
YAML
42 lines
596 B
YAML
image: node:latest
|
|
|
|
services:
|
|
- postgres:latest
|
|
|
|
variables:
|
|
NODE_ENV: "ci"
|
|
POSTGRES_DB: "postgres"
|
|
POSTGRES_USER: "postgres"
|
|
POSTGRES_PASSWORD: "postgres"
|
|
|
|
stages:
|
|
- build
|
|
- migrate
|
|
- test
|
|
|
|
cache:
|
|
paths:
|
|
- node_modules/
|
|
|
|
install_dependencies:
|
|
stage: build
|
|
script:
|
|
- yarn install
|
|
artifacts:
|
|
paths:
|
|
- node_modules/
|
|
|
|
migrate:
|
|
stage: migrate
|
|
script:
|
|
- ./node_modules/.bin/sequelize db:migrate
|
|
|
|
seed:
|
|
stage: seed
|
|
script:
|
|
- ./node_modules/.bin/sequelize db:seed:all
|
|
|
|
testing:
|
|
stage: test
|
|
script:
|
|
- yarn test --ci --collectCoverage=true
|