-
Notifications
You must be signed in to change notification settings - Fork 16
/
.travis.yml
75 lines (69 loc) · 3.72 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
language: node_js
node_js: 8
dist: trusty
services:
- docker
addons:
apt:
packages:
- bash
- git
- dbus
- dbus-x11
- xvfb
- make
- jq # required by dist/build.sh
# - wine # ibid, for windows builds
- g++
- libnss3
- libasound2
- libgconf-2-4
- libxtst6
- libxss1
- libgtk2.0-0
env:
global:
- DISPLAY=:99
- API_HOST=172.17.0.1
- REDIS_URL=redis://172.17.0.1:6379 # we'll pick up openwhisk's redis
- UV_THREADPOOL_SIZE=128 # might be superfluous; was trying to work around ESOCKETTIMEOUT on linux
- NO_NOTIFICATIONS=true # try not to use Notifications in the browser
- WINDOW_WIDTH=1400 # ! important ! so that clicks don't fail due to elements being off-viewport
- WINDOW_HEIGHT=1050 # ! ibid !
- KEY_FROM_LAYER=true # use one api key per test layer
- TEST_FROM_BUILD="${TRAVIS_BUILD_DIR}/dist/build/IBM Cloud Shell-linux-x64/IBM Cloud Shell" # test against a specific dist build
install:
- echo "APIHOST=foo" > ~/.wskprops # dist/compile.sh needs something here
- echo "AUTH=bar" >> ~/.wskprops # ibid (see the call to initOW in openwhisk-core.js)
- (npm install && npm run install-ui && cd tests && npm install && npm run _instrument) & # app and tests npm install
- (./tools/travis/setup.sh; ./tools/travis/build.sh; ./tools/travis/init_auth.sh) & # initialize openwhisk and test docker
- wait # wait for the above &'d background processes
- Xvfb $DISPLAY -screen 0 ${WINDOW_WIDTH}x${WINDOW_HEIGHT}x24 -ac & # start virtual framebuffer process
- sleep 5 # wait a bit for it to come up
- echo "AUTH=bar" >> ~/.wskprops # tools/travis/build.sh overrides this
- (cd dist && ./build.sh linux) # create a dist build to test against
# ^^^ for the dist build, notice that we build for all platforms, even
# though travis only needs linux; this is done purposefully, so as
# to test the dist build mechanism for all platforms
- echo "composer plugin version `cat app/plugins/modules/composer/package.json | jq --raw-output .version`" # log to travis just in case
- cat app/plugins/.pre-scanned | jq .commandToPlugin # ibid
- cat app/plugins/.pre-scanned | jq .overrides # ibid
- echo "install steps completed with success"
# corral the tests that plugins might offer
- echo "Test corral"
- (cd tests && ./bin/corral.sh)
# if for some reason we want to avoid the use of travis jobs:
#script: (cd tests && npm run test)
#script: (cd tests && ./bin/runLocal.sh 01 08 07 02 03 04a 04b 05)
jobs:
include:
- script: (cd tests && ./bin/runLocal.sh 01 08 02 05) # test a couple of layers here, as they're all small
env: EXECUTING=01:08:02:05 # this env var will help us distinguish jobs in the travis console
- script: (cd tests && ./bin/runLocal.sh 07)
env: EXECUTING=07
- script: (cd tests && ./bin/runLocal.sh 03)
env: EXECUTING=03
- script: (cd tests && ./bin/runLocal.sh 04a)
env: EXECUTING=04a
- script: (cd tests && ./bin/runLocal.sh 04b)
env: EXECUTING=04b