forked from alfa-laboratory/arui-feather
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
79 lines (65 loc) · 1.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
76
77
78
79
sudo: required
dist: trusty
language: node_js
node_js:
- '8.10.0'
env:
matrix:
- TEST_SCOPE: lint
- TEST_SCOPE: unit
- TEST_SCOPE: gemini
matrix:
fast_finish: true
deploy:
provider: script
script: sh $TRAVIS_BUILD_DIR/tools/publish-styleguide.sh
skip_cleanup: true
on:
branch: master
condition: $TEST_SCOPE=lint
before_install:
- npm cache clean --force
- rm -rf ~/.npm node_modules
install:
- npm i
before_script:
- |
if [ "${TEST_SCOPE}" == "gemini" ]; then
npm run sauce-connect
cat ./.gemini.js
fi
script:
- if [ "${TEST_SCOPE}" == "lint" ]; then npm run lint; fi
- if [ "${TEST_SCOPE}" == "unit" ]; then npm run test:coverage; fi
# Only run when pull request or master updating
- if [[ "${TEST_SCOPE}" == "gemini" ]]; then
if [[ "${TRAVIS_PULL_REQUEST}" != "false" ]] || ([[ "${TRAVIS_BRANCH}" == "master" ]] || [[ "${TRAVIS_PULL_REQUEST}" == "false" ]]); then
if [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then export ALL_BROWSERS=1 ALL_SIZES=1; fi;
npm run gemini-ci;
fi;
fi
after_script:
- |
if [ "${TEST_SCOPE}" == "lint" ] && [ -n "${TRAVIS_TAG}" ]; then
npm run github-release;
fi
- |
if [ "${TEST_SCOPE}" == "gemini" ]; then
kill -9 `lsof -i :4445 -t`
fi
after_success:
- |
if [[ "${TRAVIS_BRANCH}" == "master" ]] && [[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then
if [ "${TEST_SCOPE}" == "lint" ]; then
sh ./tools/publish-styleguide.sh
fi
fi
- |
if [ "${TEST_SCOPE}" == "unit" ]; then
cat ./coverage/lcov.info | ./node_modules/.bin/coveralls
fi
after_failure:
- |
if [ "${TEST_SCOPE}" == "gemini" ]; then
sh ./tools/publish-gemini-report.sh
fi