forked from berstend/puppeteer-extra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
66 lines (54 loc) · 1.95 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
language: node_js
dist: trusty
addons:
apt:
packages:
# This is required to run new chrome on old trusty
- libnss3
language: node_js
# allow headful tests
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
# test against multiple node versions
node_js:
- '13'
- '10'
# Fix for: error [email protected]: The platform "linux" is incompatible with this module.
install: skip
# Prevent potential issues
cache:
npm: false
yarn: false
# test against multiple puppeteer versions
env:
- PUPPETEER_VERSION=5.0.0
- PUPPETEER_VERSION=2.1.1 # Chromium 79.0.3942.0, Oct 24 2019
# - PUPPETEER_VERSION=2.0.0 # Chromium 79.0.3942.0, Oct 24 2019
# - PUPPETEER_VERSION=1.20.0 # Chromium 78.0.3882.0, Sep 13 2019
# - PUPPETEER_VERSION=1.15.0 # Chromium 75.0.3765.0, Apr 26 2019
# - PUPPETEER_VERSION=1.9.0 # Chromium 71.0.3563.0, Oct 4, 2018
# - PUPPETEER_VERSION=1.6.2 # Chromium 69.0.3494.0, Aug 1, 2018
script:
# Make sure to use latest @next package
# https://github.com/yarnpkg/yarn/issues/4731
# Fix for: error [email protected]: The platform "linux" is incompatible with this module.
- npx json -I -f package.json -e 'this.resolutions={}'
# - npx json -I -f package.json -e 'this.resolutions={"**/puppeteer":"'${PUPPETEER_VERSION}'"}'
# Install older version when required
- rm -rf ./node_modules/
# - 'yarn; echo 0'
# - 'yarn lerna exec "rm -f yarn.lock; rm -rf node_modules; echo 0"'
# - 'rm -rf yarn.lock && yarn cache clean && rm -rf ./node_modules/puppeteer && yarn lerna add puppeteer@${PUPPETEER_VERSION}'
# - "yarn lerna exec --concurrency 1 'yarn set resolution --save puppeteer@* 5.0.0; echo 0'"
- 'yarn'
- 'yarn bootstrap'
- yarn lerna add puppeteer@${PUPPETEER_VERSION}
- 'yarn lerna link'
- 'yarn lerna run build --concurrency 1'
# For debugging
- yarn list puppeteer
- yarn list puppeteer-extra
- file node_modules/puppeteer-extra/dist/index.cjs.js
# Run tests
- yarn test-ci