Added gitlab pipeline config
This commit is contained in:
parent
9f0886541c
commit
fae42cb001
2 changed files with 35 additions and 0 deletions
27
.gitlab-ci.yml
Normal file
27
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
image: node:latest
|
||||||
|
|
||||||
|
variables:
|
||||||
|
NODE_ENV: "ci"
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
- test
|
||||||
|
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- node_modules/
|
||||||
|
|
||||||
|
install_dependencies:
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- yarn install
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- node_modules/
|
||||||
|
|
||||||
|
testing_testing:
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- ./node_modules/.bin/sequelize db:migrate
|
||||||
|
- ./node_modules/.bin/sequelize db:seed:all
|
||||||
|
- yarn test --ci --collectCoverage=true
|
|
@ -6,5 +6,13 @@
|
||||||
"host": "sequelize-middleware-db",
|
"host": "sequelize-middleware-db",
|
||||||
"dialect": "postgres",
|
"dialect": "postgres",
|
||||||
"seederStorage": "sequelize"
|
"seederStorage": "sequelize"
|
||||||
|
},
|
||||||
|
"ci": {
|
||||||
|
"username": "postgres",
|
||||||
|
"password": "",
|
||||||
|
"database": "postgres",
|
||||||
|
"host": "postgres",
|
||||||
|
"dialect": "postgres",
|
||||||
|
"seederStorage": "sequelize"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue