mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
82 lines
2.7 KiB
YAML
82 lines
2.7 KiB
YAML
name: DevTools CI
|
|
|
|
# Declare default permissions as read only.
|
|
permissions: read-all
|
|
|
|
on:
|
|
pull_request:
|
|
types: [labeled]
|
|
|
|
concurrency:
|
|
group: devtools-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build-puppeteer:
|
|
name: Build Puppeteer
|
|
runs-on: ubuntu-latest
|
|
if: contains(github.event.label.name, 'devtools')
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
|
|
with:
|
|
cache: npm
|
|
node-version-file: '.nvmrc'
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
env:
|
|
PUPPETEER_SKIP_DOWNLOAD: true
|
|
- name: Build Puppeteer
|
|
run: |
|
|
npm run build -w @puppeteer/browsers
|
|
npm run build -w puppeteer-core
|
|
npm run build -w puppeteer
|
|
- name: Pack Puppeteer
|
|
run: |
|
|
npm pack -w @puppeteer/browsers
|
|
npm pack -w puppeteer-core
|
|
npm pack -w puppeteer
|
|
- name: Upload Puppeteer build
|
|
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
|
|
with:
|
|
name: puppeteer-build
|
|
if-no-files-found: error
|
|
path: puppeteer-*.tgz
|
|
|
|
devtools-tests:
|
|
name: DevTools tests
|
|
needs: build-puppeteer
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Download Puppeteer build
|
|
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
|
|
with:
|
|
name: puppeteer-build
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
- name: Checkout depot_tools
|
|
run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
|
- name: Add depot_tools to path
|
|
run: echo $(realpath depot_tools) >> $GITHUB_PATH
|
|
- name: Fetch devtools-frontend
|
|
run: fetch devtools-frontend
|
|
- name: Sync gclient
|
|
working-directory: devtools-frontend
|
|
run: gclient sync
|
|
- name: Install Puppeteer
|
|
working-directory: devtools-frontend
|
|
run: |
|
|
puppeteer_pkgs=(../puppeteer-*.tgz)
|
|
tar -xf ${puppeteer_pkgs[1]} --strip-components 1 -C node_modules/@puppeteer/browsers
|
|
tar -xf ${puppeteer_pkgs[2]} --strip-components 1 -C node_modules/puppeteer-core
|
|
- name: Generate targets
|
|
working-directory: devtools-frontend
|
|
run: gn gen out/Default --args='devtools_skip_typecheck=true'
|
|
- name: Run tests
|
|
working-directory: devtools-frontend
|
|
run: npm run auto-e2etest
|