@@ -2,17 +2,18 @@ language: node_js
2
2
node_js :
3
3
- 4
4
4
- 6
5
- - 7
5
+ - 8
6
6
cache :
7
- yarn : true
8
7
directories :
9
- - $HOME/.npm
8
+ - node_modules
10
9
- travis_phantomjs
11
10
env :
12
11
# Test everything in Webpack 1 and 2
13
12
- export WEBPACK_VERSION="2"
14
13
- export WEBPACK_VERSION="1"
15
14
before_install :
15
+ # Upgrade npm
16
+ - if [[ `npm -v` != 5* ]]; then npm install -g npm@latest; fi
16
17
# Upgrade PhantomJS
17
18
- |
18
19
export PHANTOMJS_VERSION=2.1.1
@@ -26,36 +27,35 @@ before_install:
26
27
phantomjs -v
27
28
before_script :
28
29
# Manually install Webpack 1 or 2
29
- - if [ "$WEBPACK_VERSION" == "1" ]; then yarn add webpack@1; fi
30
- - yarn list webpack
30
+ - if [ "$WEBPACK_VERSION" == "1" ]; then npm install --no-save webpack@1; fi
31
+ - npm list webpack
31
32
script :
32
33
# Run lint
33
- - yarn list eslint-plugin-react
34
- - yarn run lint
34
+ - npm run lint
35
35
# Run tests
36
36
- |
37
- if [[ "$TRAVIS_NODE_VERSION" =~ ^(4|5)$ ]]; then
37
+ if [[ "$TRAVIS_NODE_VERSION" == "4" ]]; then
38
38
NODE_ENV=test node --harmony-proxies $(npm bin)/jest --runInBand
39
39
else
40
- if [[ "$TRAVIS_NODE_VERSION" == "7 " && "$WEBPACK_VERSION" == "2" ]]; then
41
- yarn run test:coverage -- --runInBand
40
+ if [[ "$TRAVIS_NODE_VERSION" == "8 " && "$WEBPACK_VERSION" == "2" ]]; then
41
+ npm run test:coverage -- --runInBand
42
42
else
43
- yarn run test:jest -- --runInBand
43
+ npm run test:jest -- --runInBand
44
44
fi
45
45
fi
46
46
# Build all examples
47
- - yarn run build
48
- - yarn run build:customised
49
- - yarn run build:sections
47
+ - npm run build
48
+ - npm run build:customised
49
+ - npm run build:sections
50
50
# Check that examples really works: no JS errors on load
51
- - yarn run phantomjs
52
- - yarn run phantomjs:customised
53
- - yarn run phantomjs:sections
51
+ - npm run phantomjs
52
+ - npm run phantomjs:customised
53
+ - npm run phantomjs:sections
54
54
after_success :
55
55
# Make release with semantic-release if needed
56
56
- npm run semantic-release
57
57
- |
58
- if [[ "$TRAVIS_NODE_VERSION" == "7 " && "$WEBPACK_VERSION" == "2" ]]; then
58
+ if [[ "$TRAVIS_NODE_VERSION" == "8 " && "$WEBPACK_VERSION" == "2" ]]; then
59
59
# Upload coverage report to Codecov
60
60
bash <(curl -s https://codecov.io/bash)
61
61
# Update site
0 commit comments