2023-04-25 13:12:32 +00:00
|
|
|
name: DevTools CI
|
|
|
|
|
|
|
|
# Declare default permissions as read only.
|
|
|
|
permissions: read-all
|
|
|
|
|
|
|
|
on:
|
2023-04-25 14:12:18 +00:00
|
|
|
pull_request:
|
|
|
|
types: [labeled]
|
2023-04-25 13:12:32 +00:00
|
|
|
|
|
|
|
concurrency:
|
2023-07-04 12:17:25 +00:00
|
|
|
group: devtools-${{ github.head_ref || github.run_id }}
|
2023-04-25 13:12:32 +00:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-puppeteer:
|
|
|
|
name: Build Puppeteer
|
|
|
|
runs-on: ubuntu-latest
|
2023-04-25 14:12:18 +00:00
|
|
|
if: contains(github.event.label.name, 'devtools')
|
2023-04-25 13:12:32 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2024-05-21 08:14:13 +00:00
|
|
|
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
2023-04-25 13:12:32 +00:00
|
|
|
- name: Set up Node.js
|
2024-02-12 09:49:18 +00:00
|
|
|
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
2023-04-25 13:12:32 +00:00
|
|
|
with:
|
|
|
|
cache: npm
|
2024-01-24 10:27:35 +00:00
|
|
|
node-version-file: '.nvmrc'
|
2023-04-25 13:12:32 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: npm ci
|
|
|
|
env:
|
|
|
|
PUPPETEER_SKIP_DOWNLOAD: true
|
|
|
|
- name: Build Puppeteer
|
|
|
|
run: |
|
2023-11-10 13:45:37 +00:00
|
|
|
npm run build -w @puppeteer/browsers
|
|
|
|
npm run build -w puppeteer-core
|
|
|
|
npm run build -w puppeteer
|
2023-04-25 13:12:32 +00:00
|
|
|
- name: Pack Puppeteer
|
|
|
|
run: |
|
2023-11-10 13:45:37 +00:00
|
|
|
npm pack -w @puppeteer/browsers
|
|
|
|
npm pack -w puppeteer-core
|
|
|
|
npm pack -w puppeteer
|
2023-04-25 13:12:32 +00:00
|
|
|
- name: Upload Puppeteer build
|
2024-04-29 08:53:29 +00:00
|
|
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
|
2023-04-25 13:12:32 +00:00
|
|
|
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
|
2024-04-29 08:53:29 +00:00
|
|
|
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
|
2023-04-25 13:12:32 +00:00
|
|
|
with:
|
|
|
|
name: puppeteer-build
|
|
|
|
- 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: |
|
2024-05-08 06:05:54 +00:00
|
|
|
npm install ../puppeteer-browsers*.tgz ../puppeteer-core*.tgz
|
2023-04-25 13:12:32 +00:00
|
|
|
- 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
|