From 1cc67ed6bdcc2a77586a06a6ba6734ec5bbb93e4 Mon Sep 17 00:00:00 2001 From: Jan Dolezel Date: Fri, 22 Jun 2018 14:21:12 +0200 Subject: [PATCH] Fix CI config --- .circleci/config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7a16c2ff8..5a82a9f3f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,6 +9,7 @@ save: &save paths: - . - ".git" + - "~/.npm-global" restore: &restore restore_cache: @@ -57,6 +58,8 @@ jobs: test-pg: docker: - <<: *node-image + environment: + - DATABASE_URL=postgres://ubuntu@localhost:5432/circle_test - image: postgres:10.4-alpine environment: - POSTGRES_USER=ubuntu @@ -65,25 +68,22 @@ jobs: - <<: *restore - run: name: test - environment: - - DATABASE_URL=postgres://ubuntu@localhost:5432/circle_test command: npm run migrate up -- -m test/migrations && npm run migrate down 0 -- -m test/migrations --timestamps test-cocroach: docker: - <<: *node-image + environment: + - DATABASE_URL=postgresql://root@localhost:26257/circle_test - image: cockroachdb/cockroach:v1.1.8 command: ['start', '--insecure', '--host=localhost'] steps: - <<: *restore - run: name: create-cockroach-db - command: node -e '(new require("pg").Pool({connectionString:process.env.DATABASE_URL_COCKROACH})).query("CREATE DATABASE circle_test").then(function(){process.exit(0)})' + command: node -e '(new require("pg").Pool({connectionString:process.env.DATABASE_URL})).query("CREATE DATABASE circle_test").then(function(){process.exit(0)})' - run: name: test - environment: - - DATABASE_URL=postgresql://root@localhost:26257/circle_test command: npm run migrate up -- -m test/cockroach -s '' --migrations-schema circle_test --no-lock && npm run migrate down 0 -- -m test/cockroach -s '' --migrations-schema circle_test --no-lock --timestamps - - run: greenkeeper-lockfile-upload finish: docker: - <<: *node-image