Skip to content

Commit 1e7f401

Browse files
committed
test(circle): use couchdb
1 parent a2ff872 commit 1e7f401

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

circle.yml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,40 @@
11
# Doesn't actually work!
22
# node:
3-
# version: 7.10.0
3+
# version: 8.1.4
4+
5+
# Uncomment to test with CouchDB 2
6+
machine:
7+
services:
8+
- docker
49

510
dependencies:
611
pre:
7-
- nvm install 7.10.0
8-
- nvm use 7.10.0 && npm install -g npm
12+
- nvm install 8.1.4
13+
- nvm use 8.1.4 && npm install -g npm
14+
15+
# Install CouchDB 2
16+
- docker run -d --name couchdb --restart always -p 5984:5984 -e COUCHDB_USER='admin' -e COUCHDB_PASSWORD='admin' redgeoff/couchdb
17+
# Wait for DB to be ready
18+
- sleep 15
19+
# Create system DBs
20+
- curl -X PUT http://admin:admin@db.quizster.dev:5984/_users
21+
- curl -X PUT http://admin:admin@db.quizster.dev:5984/_replicator
22+
- curl -X PUT http://admin:admin@db.quizster.dev:5984/_global_changes
23+
24+
# Enable CORS
25+
- nvm use 8.1.4 && npm install -g add-cors-to-couchdb
26+
- nvm use 8.1.4 && add-cors-to-couchdb http://localhost:5984 -u admin -p admin
927

1028
override:
11-
- nvm use 7.10.0 && npm install
29+
- nvm use 8.1.4 && npm install
1230

1331
test:
1432
pre:
15-
- nvm use 7.10.0 && npm run assert-beautified
16-
- nvm use 7.10.0 && npm run jshint
33+
- nvm use 8.1.4 && npm run assert-beautified
34+
- nvm use 8.1.4 && npm run jshint
1735

1836
override:
19-
- nvm use 7.10.0 && npm run node-full-test
20-
- nvm use 7.10.0 && npm run browser-test-phantomjs
21-
- nvm use 7.10.0 && npm run browser-coverage-full-test
37+
# Test on CouchDB 2
38+
- nvm use 8.1.4 && npm run node-full-test
39+
- nvm use 8.1.4 && npm run browser-test-phantomjs
40+
- nvm use 8.1.4 && npm run browser-coverage-full-test

0 commit comments

Comments
 (0)