webextension-polyfill/.travis.yml

40 lines
1.7 KiB
YAML
Raw Normal View History

language: node_js
node_js:
## Some of the ES6 syntax used in the browser-polyfill sources is only supported on nodejs >= 6
## and the selenium-webdriver dependency used by the integration tests requires nodejs >= 8.
fix(travis): Run tests with Node 10 instead of 8 (#238) CI is currently failing because package.json refers chromedriver ^80.0.1, which also matches 80.0.2. In 80.0.2, chromedriver updated the `extract-zip` dependency: https://github.com/giggio/node-chromedriver/commit/16151de4c7bd87ef952665deb95aa56ce3539948 extract-zip 2.0.0 has dropped support for Node <10, e.g. by using APIs that were introduced in Node 10: https://github.com/maxogden/extract-zip/blob/v2.0.0/index.js#L11 which triggers the following error when run on earlier versions of Node: ``` > chromedriver@80.0.2 install /home/travis/build/mozilla/webextension-polyfill/node_modules/chromedriver > node install.js internal/util.js:214 throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function'); ^ TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function at promisify (internal/util.js:214:11) at Object.<anonymous> (/home/travis/build/mozilla/webextension-polyfill/node_modules/extract-zip/index.js:11:18) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Module.require (module.js:597:17) at require (internal/module.js:11:18) at Object.<anonymous> (/home/travis/build/mozilla/webextension-polyfill/node_modules/chromedriver/install.js:14:20) ``` This commit fixes the issue by running tests with Node 10. Node 8 had become end-of-life on 2019-12-31 anyway.
2020-09-17 07:42:11 +00:00
## and the chromedriver dependency requires Node >= 10.
- '10'
script:
- npm run build
- npm run test-coverage
- echo "RE-RUN tests on the minified file" && npm run test-minified
- echo "RE-RUN tests on the webpack and browserify bundled files" &&
npm install -g browserify webpack webpack-cli &&
node ./scripts/run-module-bundlers-smoketests.js
- export DISPLAY=:99.0
- echo "RUN integration tests on real browsers" &&
TRAVIS_CI=true node ./scripts/run-browsers-smoketests.js
## See https://docs.travis-ci.com/user/chrome
sudo: required
addons:
firefox: 'latest'
chrome: 'stable'
services: ["xvfb"]
after_script: npm run publish-coverage
deploy:
provider: npm
email: addons-dev-automation+npm@mozilla.com
skip_cleanup: true
on:
tags: true
repo: mozilla/webextension-polyfill
branch: master
api_key:
secure: K4rZPsnERK4hiVJICp2MGjLSiL64AeDc0yxmr54/ZlbAYy5OhtDrtaZ0L65eGx+HuIgVQbduSNn1zBN/Bx7w8zmYVyXdTVD1HqXuopS+vmBTrwW/d28uKdpCcMo311ODbk//AL3ylTCeOMkSsLsbb5Io6zcEpuw0VLtSNSrytaA85vcUIj2l8iurLrThN3r7iIsIEHceCzDo3KDx/o4yh7cEKs0FP9Jl8A6jm8sTt/j3jLmsxFFXp/SWOvPCQFX1hCu2uLgCtoLbFJlaDq2+RzsEXv4K5Ee5coVtc4vLRiNjC1UP7cHqfN8VZ0I2LeVT79MRmLqRAccGCSMdarFgoA2SW1laNch0vXy6hBSluh+OVJVPDrz7Xdyy70rt+57tJYFCtpZ24E6X+GNyOOMYfIsatvv59h5R6vE3hWvNZVtiOhYw9wMrKBA9rLkzyoCXeEVu4BuU834RbeeYUAg9VR6WZ1U2nD4IxGr33mSPDqsA6tOhr7tM0kEmg2eVe8qHop8BRtUAhQfkY6C+kfRkPE0OZBq4kiWcfugRJyKI7rAp9T5JNUSLW5X1KrvRv0RBaDr8SKFaWHE4N5Dbt/u2zluq+wJn/n5IxvEFDHSAzxLWBDz+LsmZ1eXRdfA+Pu4cyIKjMX1O8yPAnX8RCTc9oq8Qj74l5rXzCJtmygRdf2I=