Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added cocroach v2 to tests #289

Merged
merged 1 commit into from
Jun 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
- run:
name: test
command: npm run migrate up -- -m test/migrations && npm run migrate down 0 -- -m test/migrations --timestamps
test-cocroach:
test-cocroach-1:
docker:
- <<: *node-image
environment:
Expand All @@ -88,6 +88,21 @@ jobs:
- run:
name: 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
test-cocroach-2:
docker:
- <<: *node-image
environment:
- DATABASE_URL=postgresql://root@localhost:26257/circle_test
- image: cockroachdb/cockroach:v2.0.3
command: ['start', '--insecure', '--host=localhost']
steps:
- <<: *restore
- run:
name: create-cockroach-db
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
command: npm run migrate up -- -m test/cockroach --no-lock && npm run migrate down 0 -- -m test/cockroach --no-lock --timestamps
test-node-6:
docker:
- image: circleci/node:6
Expand Down Expand Up @@ -117,7 +132,10 @@ workflows:
- test-pg:
requires:
- install
- test-cocroach:
- test-cocroach-1:
requires:
- install
- test-cocroach-2:
requires:
- install
- test-node-6:
Expand Down
2 changes: 1 addition & 1 deletion test/cockroach/019_add_index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
exports.up = pgm => {
pgm.createIndex("t1", ["nmbr"], { unique: true });
pgm.createIndex("t1", ["nmbr"], { unique: true, cascade: true });
};