From fae42cb00176c80018e942ea1f04fd061b77e57a Mon Sep 17 00:00:00 2001 From: dbroqua Date: Tue, 11 Feb 2020 19:22:29 +0100 Subject: [PATCH] Added gitlab pipeline config --- .gitlab-ci.yml | 27 +++++++++++++++++++++++++++ config/config.json | 8 ++++++++ 2 files changed, 35 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..c6d4bfd --- /dev/null +++ b/.gitlab-ci.yml @@ -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 diff --git a/config/config.json b/config/config.json index 9f446a9..08a7382 100644 --- a/config/config.json +++ b/config/config.json @@ -6,5 +6,13 @@ "host": "sequelize-middleware-db", "dialect": "postgres", "seederStorage": "sequelize" + }, + "ci": { + "username": "postgres", + "password": "", + "database": "postgres", + "host": "postgres", + "dialect": "postgres", + "seederStorage": "sequelize" } } \ No newline at end of file