forked from pouchdb/pouchdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
142 lines (115 loc) · 5.58 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
language: node_js
node_js:
- "10"
services:
- docker
- xvfb
git:
depth: 30
dist: xenial
sudo: true
addons:
jwt:
secure: YlCp9qGHmnnATcScIQVyOt8eI9FxLhMGAz9iRTHh7r41ADjfGJUzyqkWoBLcCagiQWtqtUujukPAtRuOibbBp9SvmGp+IIdbwHVUDvSZNOvGxkQ1qczeGxJcnht+2YNoCwfzkHW4vFrNiGOULdjvbWAB4sAJ8N0AZPShURwXU1E=
before_install:
# Because Saucelabs doesnt proxy 5984 on OSX
- "if [ -z \"$COUCH_HOST\" ]; then export COUCH_HOST=http://127.0.0.1:3000; fi"
before_script:
# Fail early so we dont run hours of saucelabs if we know there
# is a lint failure
- npm run eslint
# travis_retry will try up to 3 times to run the script. our tests
# are flaky enough (Selenium, SauceLabs, network, etc.) that this
# mitigates a lot of false negatives
script: travis_retry npm run $COMMAND
env:
global:
- NPM_CONFIG_PROGRESS="false"
- SAUCE_USERNAME=pouchdb
matrix:
- CLIENT=node COMMAND=test
# Test in-memory in Node
- CLIENT=node ADAPTER=memory COMMAND=test
# Test in firefox running on travis
- CLIENT=selenium:firefox ADAPTER=idb COMMAND=test
- CLIENT=selenium:firefox ADAPTER=idb POUCHDB_SRC="../../packages/node_modules/pouchdb/dist/pouchdb.min.js" COMMAND=test
- CLIENT=selenium:firefox ADAPTER=indexeddb COMMAND=test
- CLIENT=selenium:firefox ADAPTER=indexeddb POUCHDB_SRC="../../packages/node_modules/pouchdb/dist/pouchdb.min.js" COMMAND=test
# Test in chromium running on travis
- CLIENT=saucelabs:chrome:70 ADAPTER=idb COMMAND=test
- CLIENT=saucelabs:chrome:70 ADAPTER=indexeddb COMMAND=test
# Test auto-compaction in Node and Firefox
- AUTO_COMPACTION=true CLIENT=node COMMAND=test
- AUTO_COMPACTION=true CLIENT=selenium:firefox ADAPTER=idb COMMAND=test
- AUTO_COMPACTION=true CLIENT=selenium:firefox ADAPTER=indexeddb COMMAND=test
# Test map/reduce
- TYPE=mapreduce CLIENT=node COMMAND=test
- TYPE=mapreduce CLIENT=selenium:firefox ADAPTER=idb COMMAND=test
- TYPE=mapreduce CLIENT=saucelabs:chrome:70 ADAPTER=idb COMMAND=test
- TYPE=mapreduce CLIENT=selenium:firefox ADAPTER=indexeddb COMMAND=test
- TYPE=mapreduce CLIENT=saucelabs:chrome:70 ADAPTER=indexeddb COMMAND=test
# Test pouchdb-find
- COUCH_HOST=http://127.0.0.1:3001 TYPE=find PLUGINS=pouchdb-find CLIENT=node SERVER=couchdb-master COMMAND=test
- TYPE=find PLUGINS=pouchdb-find CLIENT=selenium:firefox ADAPTER=idb SERVER=pouchdb-server COMMAND=test
- TYPE=find PLUGINS=pouchdb-find CLIENT=saucelabs:chrome:70 ADAPTER=idb SERVER=pouchdb-server COMMAND=test
- TYPE=find PLUGINS=pouchdb-find CLIENT=selenium:firefox ADAPTER=indexeddb SERVER=pouchdb-server COMMAND=test
- TYPE=find PLUGINS=pouchdb-find CLIENT=saucelabs:chrome:70 ADAPTER=indexeddb SERVER=pouchdb-server COMMAND=test
# Testing in saucelabs
- CLIENT=saucelabs:chrome:70 COMMAND=test
- SKIP_MIGRATION=true CLIENT=saucelabs:safari:10 COMMAND=test
# Split up the ie test suites (they are faily)
- GREP=test.basics.js CLIENT="saucelabs:internet explorer:11:Windows 10" COMMAND=test
- GREP=suite2 SKIP_MIGRATION=true CLIENT="saucelabs:MicrosoftEdge:14:Windows 10" COMMAND=test
- GREP=suite2 INVERT=true SKIP_MIGRATION=true CLIENT="saucelabs:MicrosoftEdge:14:Windows 10" COMMAND=test
- GREP=suite2 SKIP_MIGRATION=true CLIENT="saucelabs:internet explorer:11:Windows 10" COMMAND=test
- GREP=suite2 INVERT=true SKIP_MIGRATION=true CLIENT="saucelabs:internet explorer:11:Windows 10" COMMAND=test
- SKIP_MIGRATION=true CLIENT=saucelabs:iphone:11.2 COMMAND=test
- CLIENT="saucelabs:Android:6.0:Linux" COMMAND=test
# Test memory
- CLIENT=selenium:firefox ADAPTERS=memory COMMAND=test
# Test Webpack bundle
- CLIENT=selenium:firefox COMMAND=test-webpack
# Test CouchDB master (aka bigcouch branch)
- COUCH_HOST=http://127.0.0.1:3001 CLIENT=node SERVER=couchdb-master COMMAND=test
- COUCH_HOST=http://127.0.0.1:3001 SKIP_MIGRATION=true CLIENT=selenium:firefox SERVER=couchdb-master COMMAND=test
# Performance tests
- CLIENT=selenium:firefox PERF=1 COMMAND=test
- PERF=1 COMMAND=test
- COMMAND=test-unit
- COMMAND=test-component
- COMMAND=test-fuzzy
- SERVER=pouchdb-server POUCHDB_SERVER_FLAGS=--in-memory PLUGINS=pouchdb-find COVERAGE=1 COMMAND=report-coverage
- COMMAND=verify-build
matrix:
fast_finish: true
include:
- node_js: "8"
services: docker
env: CLIENT=node COMMAND=test
- node_js: "10"
services: docker
env: CLIENT=node COMMAND=test
- node_js: "12"
services: docker
env: CLIENT=node COMMAND=test
allow_failures:
- env: GREP=suite2 SKIP_MIGRATION=true CLIENT="saucelabs:MicrosoftEdge:14:Windows 10" COMMAND=test
- env: GREP=suite2 INVERT=true SKIP_MIGRATION=true CLIENT="saucelabs:MicrosoftEdge:14:Windows 10" COMMAND=test
- env: GREP=suite2 SKIP_MIGRATION=true CLIENT="saucelabs:internet explorer:11:Windows 10" COMMAND=test
- env: GREP=suite2 INVERT=true SKIP_MIGRATION=true CLIENT="saucelabs:internet explorer:11:Windows 10" COMMAND=test
- env: SKIP_MIGRATION=true CLIENT=saucelabs:safari:10 COMMAND=test
# xvfb started failing, removing it broke chrome tests
# https://github.com/pouchdb/pouchdb/issues/7625
- env: CLIENT=selenium:chrome CHROME_BIN=/usr/bin/chromium-browser COMMAND=test
- env: TYPE=mapreduce CLIENT=selenium:chrome CHROME_BIN=/usr/bin/chromium-browser COMMAND=test
- env: TYPE=find PLUGINS=pouchdb-find CLIENT=selenium:chrome CHROME_BIN=/usr/bin/chromium-browser SERVER=pouchdb-server COMMAND=test
- env: CLIENT="saucelabs:Android:6.0:Linux" COMMAND=test
branches:
only:
- master
- /^greenkeeper/.*$/
cache:
directories:
- $HOME/.npm
# See https://github.com/gr2m/selsa
- node_modules/selenium-standalone/.selenium