mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
1f5e333f00
* chore: Don't store revisions in `package.json` It's quite messy to have to require the `package.json` file in multiple places purely to find out what revision of a given browser we want to use. We can also achieve better type safety by placing it in an actual source file. This commit makes that change and also tidies up our reliance on `package.json` within the source code generally; we now only use it to find the location of the Puppeteer root such that we know where to install downloaded browsers to. To avoid using `package.json` to parse the name of the module, we also now explicitly have an entry point for the Puppeteer module and the Puppeter Core module. This will make it easier in the future to ship less code as part of core (e.g. core never needs to download a browser, so why ship that code?). Core can also then not have any revisions based info contained in it. The test install script has also been updated to ensure that puppeteer-core can be installed correctly too. Finally, the `install` script has been moved to TypeScript for nicer typechecking and safety. The functionality of it has not changed.
92 lines
2.4 KiB
YAML
92 lines
2.4 KiB
YAML
language: node_js
|
|
services: xvfb
|
|
|
|
jobs:
|
|
include:
|
|
- os: "osx"
|
|
name: 'Unit tests: macOS/Chromium'
|
|
node_js: "10.19.0"
|
|
osx_image: xcode11.4
|
|
env:
|
|
- CHROMIUM=true
|
|
before_install:
|
|
- PUPPETEER_PRODUCT=firefox npm install
|
|
script:
|
|
- ls .local-chromium .local-firefox
|
|
- npm run tsc
|
|
- travis_retry npm run unit
|
|
|
|
- os: "windows"
|
|
name: 'Unit tests: Windows/Chromium'
|
|
node_js: "10.19.0"
|
|
env:
|
|
- CHROMIUM=true
|
|
before_install:
|
|
- PUPPETEER_PRODUCT=firefox npm install
|
|
script:
|
|
- ls .local-chromium .local-firefox
|
|
- npm run tsc
|
|
- travis_retry npm run unit
|
|
|
|
# Runs unit tests on Linux + Chromium
|
|
- node_js: "10.19.0"
|
|
name: 'Unit tests [with coverage]: Linux/Chromium'
|
|
env:
|
|
- CHROMIUM=true
|
|
before_install:
|
|
- PUPPETEER_PRODUCT=firefox npm install
|
|
script:
|
|
- travis_retry npm run unit-with-coverage
|
|
- npm run assert-unit-coverage
|
|
|
|
- node_js: "12.16.3"
|
|
name: 'Unit tests [Node 12]: Linux/Chromium'
|
|
env:
|
|
- CHROMIUM=true
|
|
before_install:
|
|
- PUPPETEER_PRODUCT=firefox npm install
|
|
script:
|
|
- travis_retry npm run unit
|
|
|
|
- node_js: "14.2.0"
|
|
name: 'Unit tests [Node 14]: Linux/Chromium'
|
|
env:
|
|
- CHROMIUM=true
|
|
before_install:
|
|
- PUPPETEER_PRODUCT=firefox npm install
|
|
script:
|
|
- travis_retry npm run unit
|
|
|
|
# This bot runs all the extra checks that aren't the main Puppeteer unit tests
|
|
- node_js: "10.19.0"
|
|
name: 'Extra tests: Linux/Chromium'
|
|
env:
|
|
- CHROMIUM=true
|
|
script:
|
|
- npm run compare-protocol-d-ts
|
|
- npm run lint
|
|
- npm run test-doclint
|
|
- npm run ensure-new-docs-up-to-date
|
|
|
|
# This bot runs separately as it changes package.json to test puppeteer-core
|
|
# and we don't want that leaking into other bots and causing issues.
|
|
- node_js: "10.19.0"
|
|
name: 'Test bundling and install of packages'
|
|
env:
|
|
- CHROMIUM=true
|
|
script:
|
|
- npm run test-install
|
|
|
|
# Runs unit tests on Linux + Firefox
|
|
- node_js: "10.19.0"
|
|
name: 'Unit tests: Linux/Firefox'
|
|
env:
|
|
- FIREFOX=true
|
|
before_install:
|
|
- PUPPETEER_PRODUCT=firefox npm install
|
|
script:
|
|
- travis_retry npm run funit
|
|
|
|
notifications:
|
|
email: false
|