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