sequelize-middleware/.gitlab-ci.yml

47 lines
773 B
YAML
Raw Permalink Normal View History

2020-02-11 19:22:29 +01:00
image: node:latest
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:
- test
2020-02-11 20:53:05 +01:00
- deploy
2020-02-11 19:22:29 +01:00
cache:
paths:
- node_modules/
2020-02-11 19:52:53 +01:00
testing:
stage: test
2020-02-11 20:23:48 +01:00
services:
- postgres:latest
2020-02-11 19:52:53 +01:00
script:
2020-02-11 20:23:48 +01:00
- yarn install
- ./node_modules/.bin/sequelize db:migrate
2020-02-13 22:36:14 +01:00
- ./node_modules/.bin/sequelize db:seed:all
2020-02-11 21:16:25 +01:00
- yarn test --ci --collectCoverage=true --coverage
coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/
2020-02-11 20:01:17 +01:00
artifacts:
2020-02-11 20:37:34 +01:00
paths:
- junit.xml
2020-02-11 20:45:51 +01:00
- coverage/
2020-02-11 20:47:29 +01:00
- reports/
2020-02-11 20:01:17 +01:00
reports:
junit: junit.xml
2020-02-11 20:52:06 +01:00
pages:
stage: deploy
dependencies:
- testing
script:
- mv coverage/ public/
artifacts:
paths:
- public
expire_in: 30 days
only:
- develop