Skip to content

Commit

Permalink
Fix CI config
Browse files Browse the repository at this point in the history
  • Loading branch information
dolezel committed Jun 22, 2018
1 parent c94ae46 commit 1cc67ed
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ save: &save
paths:
- .
- ".git"
- "~/.npm-global"

restore: &restore
restore_cache:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 1cc67ed

Please sign in to comment.