forked from carbon-design-system/carbon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
56 lines (45 loc) · 1.43 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
language: node_js
cache:
directories:
- node_modules
env:
- TEST_SUITE=misc
- TEST_SUITE=unit
- TEST_SUITE=unit-each
- TEST_SUITE=a11y
node_js:
- "6"
dist: trusty
addons:
apt:
packages:
- google-chrome-stable
firefox: "latest-esr"
matrix:
exclude:
- env: TEST_SUITE=unit-each
allow_failures:
- env: TEST_SUITE=unit-each
- env: TEST_SUITE=a11y
before_install:
- if [[ -n "${AAT_TOKEN}" ]]; then sed -e "s|\${AAT_TOKEN}|$AAT_TOKEN|g" < .aat.yml.src > .aat.yml; fi
- tar -xjf /tmp/firefox-latest-esr.tar.bz2 --directory /tmp
- export PATH="/tmp/firefox:$PATH"
- export CHROME_BIN=google-chrome
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
install:
- npm prune
- npm install || (cat npm-debug.log; false)
- if [[ -n "${AAT_TOKEN}" && "$TEST_SUITE" == "a11y" ]]; then npm i https://aat.mybluemix.net/dist/karma-ibma.tgz; fi
script:
- if [[ "$TEST_SUITE" == "misc" ]]; then npm run lint; fi
- if [[ "$TEST_SUITE" == "misc" ]]; then npm run build; fi
- if [[ "$TEST_SUITE" == "unit" ]]; then npm run test:unit -- -b ChromeHeadless_Travis -b Firefox; fi
- if [[ "$TEST_SUITE" == "unit-each" ]]; then find tests/spec -name "*.js" ! -name left-nav_spec.js -print0 | xargs -0 -n 1 -P 1 npm run test:unit -- -d -f; fi
- if [[ -n "${AAT_TOKEN}" && "$TEST_SUITE" == "a11y" ]]; then npm run test:a11y; fi
after_success:
- npm run semantic-release
branches:
except:
- /^v\d+\.\d+\.\d+$/