Repository navigation
Expand file tree
/
Copy path.travis.yml
More file actions
executable file
·105 lines (100 loc) · 4.62 KB
/
Copy path.travis.yml
File metadata and controls
executable file
·105 lines (100 loc) · 4.62 KB
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
language: node_js
node_js: 12 # Note: windows requires 10 or higher
dist: xenial # Note: dist>=xenial required by microk8s
cache: false # as of 20190709 trav-ci.org started loading garbage from the build cache
services:
- docker
env:
global:
- NYC=true # we want code coverage stats
- NEEDS_TOP=true # uncomment this if you want cpu and memory utilization output
- WEBPACK_CLIENT_URL="http://localhost:9080/"
- WEBPACK_POLL_INTERVAL=200000 # no need to poll for updates while testing
- WEB_COMPRESS=none
- RUNNING_KUI_TEST=true
- KUI_USE_HTTP=true
- CSP_ALLOWED_HOSTS="http://localhost:3000 ws://localhost:3000 http://localhost:9953"
- PATH=bin:$PATH
- NO_MAC_DMG_INSTALLER=`[[ "$TRAVIS_OS_NAME" == linux ]] && echo true` # we can't build macOS DMG files in linux travis :(
- WINDOW_WIDTH=1400 # ! important ! so that clicks don't fail due to elements being off-viewport
- WINDOW_HEIGHT=1050 # ! ibid !
- LINUX_BUILD="${TRAVIS_BUILD_DIR}/clients/electron/dist/electron/Kui-linux-x64/Kui" # test against linux electron build
- OSX_BUILD="${TRAVIS_BUILD_DIR}/clients/electron/dist/electron/Kui-darwin-x64/Kui.app/Contents/MacOS/Kui" # test against darwin electron build
- WINDOWS_BUILD="${TRAVIS_BUILD_DIR}/clients/electron/dist/electron/Kui-win32-x64/Kui.exe" # test against darwin electron build
- TEST_FROM_BUILD=`[ "$TRAVIS_OS_NAME" = linux ] && echo "$LINUX_BUILD" || ([ "$TRAVIS_OS_NAME" = osx ] && echo "$OSX_BUILD" || echo "$WINDOWS_BUILD")`
- BUILD_ENV=production # please note: used in dist/electron/build.sh with npm prune --production
- HOMEBREW_NO_AUTO_UPDATE=1 # disable auto update before running brew install, brew upgrade or brew tap
install: ./tools/travis/test/install.sh
script: ./tools/travis/test/script.sh
stages:
- test
- name: npm
if: branch = master AND type = push
jobs:
include:
- &test-core
env:
- LAYERS="core core-support editor"
- MOCHA_TARGETS="webpack electron"
- KUI_USE_PROXY=true
- <<: *test-core
os: osx
- stage: test
os: windows
before_install: npm config set script-shell C:\\Program\ Files\\git\\bin\\bash.exe
env: LAYERS=core MOCHA_TARGETS="electron" TEST_FILTER='about'
- stage: test
env:
- WAIT_LAYERS="bash-like-wait"
- LAYERS="bash-like"
- MOCHA_TARGETS="webpack electron"
- KUI_USE_PROXY=true
- NEEDS_IBMCLOUD_CLI=true # see plugins/plugin-bash-like/src/test/bash-like/bash-like.ts
- stage: test
env:
- LAYERS="response"
- MOCHA_TARGETS="electron"
- KUI_USE_CLIENT=test
- stage: test
env:
- LAYERS="core"
- MOCHA_TARGETS="electron"
- KUI_USE_CLIENT=base
- LINUX_BASE_BUILD="${TRAVIS_BUILD_DIR}/clients/electron/dist/electron/Kui-base-linux-x64/Kui"
- OSX_BASE_BUILD="${TRAVIS_BUILD_DIR}/clients/electron/dist/electron/Kui-base-darwin-x64/Kui.app/Contents/MacOS/Kui"
- TEST_FROM_BUILD=`[ "$TRAVIS_OS_NAME" == linux ] && echo "$LINUX_BASE_BUILD" || echo "$OSX_BASE_BUILD"`
# Notes:
#
# re: on the `npm ci` and `npm install -g` below: here, we are
# trying to avoid contamination of package-lock.json, because
# lerna will refuse to publish if it finds uncommitted changes
#
# re: git fetch --depth=1000 see https://github.com/IBM/kui/issues/2924
#
- stage: npm
env: ""
node_js: "8"
script:
- echo "NPM Deploying Started ..."
- echo "Repo name:$TRAVIS_REPO_SLUG"
- echo "Branch name:$TRAVIS_BRANCH"
- echo "TRAVIS EVENT TYPE:$TRAVIS_EVENT_TYPE"
before_deploy:
- echo "//registry.npmjs.org/:_authToken=${NPMJS_API_KEY}" > ~/.npmrc
deploy:
- provider: script
script: npm ci && npm install -g lerna && git fetch --depth=1000 && git status && git diff && lerna publish prepatch --no-git-tag-version --no-push --canary --yes --dist-tag dev --preid dev.$TRAVIS_BUILD_NUMBER
skip_cleanup: true
keep_history: true
on:
branch: master
repo: IBM/kui
condition: $TRAVIS_EVENT_TYPE = push
- provider: script
script: npm ci && npm install -g lerna && git fetch --depth=1000 && git status && git diff && lerna publish prepatch --no-git-tag-version --no-push --canary --yes --dist-tag nightly --preid nightly.$TRAVIS_BUILD_NUMBER
skip_cleanup: true
keep_history: true
on:
branch: master
repo: IBM/kui
condition: $TRAVIS_EVENT_TYPE = cron