forked from cBioPortal/cbioportal-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
85 lines (85 loc) · 3.4 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
language: node_js
node_js: 8.9.4
env:
matrix:
- TEST=unit
- TEST=end-to-end
- TEST=api-sync
global:
- secure: KMkBo4LrUf6LL/GjF6Lw8LmcmeDt4T6+icgzt1dRlODrcZT/3QBX1nxWDFjbUsTTXn9C6sEsEk8eOZdDTFUjqkkOo5m9wlNBZic4n5qfl969+KrzHW7Y5LTRvnMhjo+dIL2YFYxcwQmGiQlzXNeVQWZHeZl22Dn0NoyCVaiNsCauwqQm4gUusvVBYKY3kkOgWEjPXI8X/TAZHmLcJVFChVudDERgZZ3snSloN3YUYZwwnRu5D+T5W+VxnPhqIuiTax8my6QlhgdFHljvoa/L0yeC4nOjKYatzYKxGqgKqG0LT70G5Nzlf/vgR3zS+VhHle8FI+/hwEnUnJI0QJEjPSuJkrFqKWTH3q6rwEH+yWmG57IAol8+DdCboMwl1tjz2eLTv7t3VPjYQroC/eB9w+0aOy0KAR4jzuLLthbnfhZ+97F5xBiLFouXkRhdzuqSzskr0iEB51HupErH/Nqo7BqnrsKipB7TdMWqurAOY47hP39XBBR27EHNh99swR0Yh9jBi9inRP9ekwEvFJcOtgefz0SGxmVqwmvBQo9TzTjmExes3myBs47YVlqtLNtE8GhZJMnGRUi/bDRpyEh1OMjEUceA8M4oq94+GGLnltn+kHycvswn4zaRcsyNvLCs6NFHEOXPUDhTsOEzrfcr7StBTISX2yzAHiYjShoRTTw=
- secure: XRKS2El3GvFOcm1oeITz1ZyHFVppK+1ZoW8fFCF3hHLn+Xe7+Ik+uYmO+7ax9OoBaUAd3F4m94iqIIYjXUHMCrut/ziyPA/OpeA7rLGngfJ0wlHFmsm5vIm/lp5CZ/TtIpnlYUJtGy2jc8YCUF0Dn2LBrKUs4kuO0a7pr8VJVDFC9XKnh9diTQ+pZpcAOz4PbHeorn9g/vi9QjwWaQn6Nc2hc7ltf8MEmIcsQfBdef1X3wmpAx3Qu1OchRz1pTEJ+MIOU3vgrCMZbliLwmZgBo7MZW+bdYxdLIHIqVEwjTl20omWuSxJNh4/X17bnTyej9wZ/ytOXwemnYy5j9TXNdH4t0wcqvmySpYNKj4K9/cxb0bgaEirnLNbbopGHQYSp6RrxsVV42PEmEm741b0rPmuA4TrtPnhOHX22ATcLoSs9hT0Wh0keUrTQS+re5IxWi5ri18T6T1Hl4qIX3tQM4uxI5Z5glo35b3ASlaHeLMRx6tknYBiM39fX/ziXosEJ4dsYjowKKIGyBJjlOa3kTwE6pvFKrn/sqti8AvWOe9DLayGmLYW4cG41r7CdUwDE8ceON8d+Wamv4pLfAhxIYrMJZKrEQVp9yt4RFx/ATdjmW6Z+yygWg+KN16GX5RN2bMSlU3qrmHR3kR+qb/3v02kp2gFW/ynrLpgP6dZJwE=
before_install:
- if [[ `npm -v` != 5* ]]; then npm i -g [email protected]; fi
install:
- npm config set registry https://registry.npmjs.org/
- npm install
- npm install codecov.io
script:
- |
if [[ "${TEST}" == api-sync ]]
then
bash src/test/check_api_sync.sh
fi
- |
if [[ "${TEST}" == api-sync ]]
then
npm run syncmock || { \
echo 'WARNING: mock data out of sync with API return calls';
}
fi
- |
if [[ "${TEST}" == unit ]]
then
npm run build && \
npm test
fi
- |
if [[ "${TEST}" == end-to-end ]]
then
npm run buildDLL:dev
fi
# Use browserstack only on runs within repo (use cbioportal.org for master &
# hotfix, cbioportal.org/beta for everything else)
- |
if [[ "${TEST}" == end-to-end && "${TRAVIS_PULL_REQUEST}" = "false" ]];
then
npm run start & \
eval "$(./scripts/env_vars.sh)" && \
curl $CBIOPORTAL_URL > /dev/null && \
sleep 5s && \
curl $CBIOPORTAL_URL > /dev/null && \
sleep 5s && \
curl $CBIOPORTAL_URL > /dev/null && \
sleep 20s && \
curl http://localhost:3000 > /dev/null && \
sleep 20s && \
cd end-to-end-tests && \
npm install && \
npm run test-travis
fi
# run webdriver-manager on PRs instead of using browserstack
# not working atm
# - |
# if [[ "${TEST}" == end-to-end && "${TRAVIS_PULL_REQUEST}" != "false" ]];
# then
# npm run start & \
# npm install -g [email protected] && \
# webdriver-manager start &
# eval "$(./scripts/env_vars.sh)" && \
# curl $CBIOPORTAL_URL > /dev/null && \
# sleep 5s && \
# curl $CBIOPORTAL_URL > /dev/null && \
# sleep 5s && \
# curl $CBIOPORTAL_URL > /dev/null && \
# sleep 20s && \
# curl http://localhost:3000 > /dev/null && \
# sleep 20s && \
# cd end-to-end-tests && \
# npm install && \
# npm run test-webdriver-manager
# fi
after_success:
- cat test/fixtures/outputs/lcov.info | codecov
cache:
directories:
- node_modules