Skip to content

Commit

Permalink
test: setup couchdb docker image for travis
Browse files Browse the repository at this point in the history
  • Loading branch information
Agnes Lin committed Nov 15, 2019
1 parent 0dbdd9f commit 821b0b3
Show file tree
Hide file tree
Showing 6 changed files with 500 additions and 32 deletions.
40 changes: 15 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
sudo: false
language: node_js
node_js:
- "8"
- "10"
- "12"
- "13"
- '8'
- '10'
- '12'
- '13'

os:
- linux
Expand All @@ -22,26 +22,26 @@ after_success:

matrix:
include:
- node_js: "12"
- node_js: '12'
os: osx

# using the default script to build & run the tests
- node_js: "8"
- node_js: '8'
os: linux
env: TASK=code-lint
# Running Code Linter -- Requires @loopback/build so it's bootstrapped
script:
- lerna bootstrap --scope @loopback/build --include-dependencies
- npm run lint
- node_js: "8"
- node_js: '8'
os: linux
env: TASK=commit-lint
script: commitlint-travis
- node_js: "8"
- node_js: '8'
os: linux
env: TASK=verify-docs
script: ./bin/verify-doc-changes.sh
- node_js: "10"
- node_js: '10'
os: linux
env:
- TASK=test-repository-mongodb
Expand All @@ -51,7 +51,7 @@ matrix:
- npm run postinstall -- --scope "@loopback/test-repository-mongodb" --include-dependencies
- npm run build -- --scope "@loopback/test-repository-mongodb" --include-dependencies
- cd acceptance/repository-mongodb && npm run mocha
- node_js: "10"
- node_js: '10'
os: linux
env:
- TASK=test-repository-mysql
Expand All @@ -68,7 +68,7 @@ matrix:
- npm run postinstall -- --scope "@loopback/test-repository-mysql" --include-dependencies
- npm run build -- --scope "@loopback/test-repository-mysql" --include-dependencies
- cd acceptance/repository-mysql && npm run mocha
- node_js: "10"
- node_js: '10'
os: linux
env:
- TASK=test-repository-postgresql
Expand All @@ -80,26 +80,16 @@ matrix:
- npm run build -- --scope "@loopback/test-repository-postgresql" --include-dependencies
- psql -U postgres -a -f acceptance/repository-postgresql/test/schema.sql
- cd acceptance/repository-postgresql && npm run mocha
- node_js: "10"
- node_js: '10'
os: linux
env:
- TASK=test-repository-cloudant
- CLOUDANT_DATABASE=testdb
- CLOUDANT_USER=admin
- CLOUDANT_PASSWORD=pass
- CLOUDANT_PORT=5984
services:
- couchdb
before_script:
- curl http://localhost:5984
- curl -X PUT http://localhost:5984/testdb
- curl -X PUT http://localhost:5984/_node/couchdb@localhost/_config/admins/admin -d '"pass"'
- curl -s -X PUT http://localhost:5984/_config/admins/admin -d '"pass"'

install:
- npm ci && npm run docker:setup && source cloudant-config.sh && pwd
script:
- npm run postinstall -- --scope "@loopback/test-repository-cloudant" --include-dependencies
- npm run build -- --scope "@loopback/test-repository-cloudant" --include-dependencies
- cd acceptance/repository-cloudant && npm run mocha
- source cloudant-config.sh && cd acceptance/repository-cloudant && npm run mocha

branches:
only:
Expand Down
6 changes: 3 additions & 3 deletions acceptance/repository-cloudant/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions acceptance/repository-cloudant/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"@loopback/build": "^1.7.1",
"@loopback/eslint-config": "^4.1.2",
"@loopback/repository": "^1.15.2",
"@loopback/repository-tests": "^0.5.2",
"@types/node": "^10.14.22",
"@loopback/repository-tests": "^0.6.1",
"@types/node": "^10.17.5",
"loopback-connector-cloudant": "2.3.2"
},
"files": [
Expand Down
Loading

0 comments on commit 821b0b3

Please sign in to comment.