sequelize-middleware/.gitlab-ci.yml

38 lines
517 B
YAML
Raw Normal View History

2020-02-11 19:22:29 +01:00
image: node:latest
2020-02-11 19:49:23 +01:00
services:
- postgres:latest
2020-02-11 19:22:29 +01:00
variables:
NODE_ENV: "ci"
2020-02-11 19:49:23 +01:00
POSTGRES_DB: "postgres"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
2020-02-11 19:22:29 +01:00
stages:
- build
2020-02-11 19:52:53 +01:00
- migrate
2020-02-11 19:22:29 +01:00
- test
cache:
paths:
- node_modules/
install_dependencies:
stage: build
script:
- yarn install
artifacts:
paths:
- node_modules/
2020-02-11 19:52:53 +01:00
migrate:
stage: migrate
2020-02-11 19:22:29 +01:00
script:
- ./node_modules/.bin/sequelize db:migrate
2020-02-11 19:52:53 +01:00
testing:
stage: test
script:
2020-02-11 19:22:29 +01:00
- yarn test --ci --collectCoverage=true