Skip to content

Commit a9d184f

Browse files
devsneksapegin
authored andcommitted
Chore: Replace PhantomJS with headless Chrome (puppeteer) (styleguidist#616)
1 parent 5ad09e4 commit a9d184f

File tree

5 files changed

+212
-125
lines changed

5 files changed

+212
-125
lines changed

.travis.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,9 @@ node_js:
66
cache:
77
directories:
88
- node_modules
9-
- travis_phantomjs
109
before_install:
1110
# Upgrade npm
1211
- if [[ `npm -v` != 5* ]]; then npm install -g npm@latest; fi
13-
# Upgrade PhantomJS
14-
- |
15-
export PHANTOMJS_VERSION=2.1.1
16-
export PATH=$PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin:$PATH
17-
if [ $(phantomjs --version) != $PHANTOMJS_VERSION ]; then
18-
rm -rf $PWD/travis_phantomjs
19-
mkdir -p $PWD/travis_phantomjs
20-
wget https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2
21-
tar -xvf phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs
22-
fi
23-
phantomjs -v
2412
script:
2513
# Run lint
2614
- npm run lint
@@ -41,9 +29,13 @@ script:
4129
- npm run build:customised
4230
- npm run build:sections
4331
# Check that examples really works: no JS errors on load
44-
- npm run phantomjs
45-
- npm run phantomjs:customised
46-
- npm run phantomjs:sections
32+
- |
33+
if [[ "$TRAVIS_NODE_VERSION" == "8" ]]; then
34+
npm run test:browser:pre
35+
npm run test:browser
36+
npm run test:browser:customised
37+
npm run test:browser:sections
38+
fi
4739
after_success:
4840
# Make release with semantic-release if needed
4941
- npm run semantic-release

0 commit comments

Comments
 (0)