sequelize-middleware/.gitlab-ci.yml
2020-02-13 22:36:14 +01:00

46 lines
773 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
- ./node_modules/.bin/sequelize db:seed:all
- yarn test --ci --collectCoverage=true --coverage
coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/
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