sequelize-middleware/.gitlab-ci.yml
2020-02-11 20:53:05 +01:00

44 lines
666 B
YAML

image: node:latest
variables:
NODE_ENV: "ci"
POSTGRES_DB: "postgres"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
stages:
- test
- deploy
cache:
paths:
- node_modules/
testing:
stage: test
services:
- postgres:latest
script:
- yarn install
- ./node_modules/.bin/sequelize db:migrate
- yarn test --ci --collectCoverage=true
artifacts:
paths:
- junit.xml
- coverage/
- reports/
reports:
junit: junit.xml
pages:
stage: deploy
dependencies:
- testing
script:
- mv coverage/ public/
artifacts:
paths:
- public
expire_in: 30 days
only:
- develop