mirror of
https://github.com/donl/slouch.git
synced 2026-06-30 06:11:57 -06:00
58 lines
2 KiB
YAML
58 lines
2 KiB
YAML
# Doesn't actually work!
|
|
# node:
|
|
# version: 8.1.4
|
|
|
|
# Uncomment to test with CouchDB 2
|
|
machine:
|
|
services:
|
|
- docker
|
|
|
|
dependencies:
|
|
pre:
|
|
- nvm install 8.1.4
|
|
- nvm use 8.1.4 && npm install -g npm
|
|
|
|
# Install CouchDB 2
|
|
# - docker run -d --name couchdb --restart always -p 5984:5984 -e COUCHDB_USER='admin' -e COUCHDB_PASSWORD='admin' redgeoff/couchdb
|
|
- docker run -d --name couchdb -p 5984:5984 -e COUCHDB_USER='admin' -e COUCHDB_PASSWORD='admin' redgeoff/couchdb
|
|
# Wait for DB to be ready
|
|
- sleep 15
|
|
# Create system DBs
|
|
- curl -X PUT http://admin:admin@localhost:5984/_users
|
|
- curl -X PUT http://admin:admin@localhost:5984/_replicator
|
|
- curl -X PUT http://admin:admin@localhost:5984/_global_changes
|
|
|
|
# # Install CouchDB 1
|
|
# - docker run -d --name couchdb-1 --restart always -p 15984:5984 couchdb:1.6.1
|
|
# # Wait for DB to be ready
|
|
# - sleep 15
|
|
# # Create admin user
|
|
# - curl -X PUT localhost:15984/_config/admins/admin -d '"admin"'
|
|
|
|
# Enable CORS
|
|
- nvm use 8.1.4 && npm install -g add-cors-to-couchdb
|
|
- nvm use 8.1.4 && add-cors-to-couchdb http://localhost:5984 -u admin -p admin
|
|
# - nvm use 8.1.4 && add-cors-to-couchdb http://localhost:15984 -u admin -p admin
|
|
|
|
override:
|
|
- nvm use 8.1.4 && npm install
|
|
|
|
test:
|
|
pre:
|
|
- nvm use 8.1.4 && npm run assert-beautified
|
|
- nvm use 8.1.4 && npm run jshint
|
|
|
|
override:
|
|
# Test on CouchDB 2
|
|
- nvm use 8.1.4 && npm run node-full-test
|
|
- nvm use 8.1.4 && npm run browser-test-phantomjs
|
|
- nvm use 8.1.4 && npm run browser-coverage-full-test
|
|
|
|
# TODO: replication and a number of other things doesn't appear to be working with the official
|
|
# couchdb 1.6.1 docker image. We'll probably need to build a custom image for these tests.
|
|
# Test on CouchDB 1
|
|
# - nvm use 8.1.4 && COUCHDB_PORT=15984 npm run node-full-test
|
|
|
|
post:
|
|
# Stop CouchDB instance to prevent bind conflicts with subsequent test containers
|
|
- docker stop couchdb
|