(imp) puppeteer 22.0.0 .. 22.15.0 #132
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
node-version: | |
- lts/iron | |
- lts/jod | |
env: | |
PUPPETEER_VERSION: 22.15.0 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
registry-url: https://registry.npmjs.org | |
node-version: ${{ matrix.node-version }} | |
- name: Get npm cache location | |
id: get-npm-cache | |
shell: bash | |
run: | | |
echo "NPM_CONFIG_CACHE=$(npm config get cache)" >> "$GITHUB_ENV" | |
echo "npm_config_cache=$(npm config get cache)" >> "$GITHUB_OUTPUT" | |
- name: Cache npm packages | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.get-npm-cache.outputs.npm_config_cache }} | |
key: npm-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: npm-${{ runner.os }}-${{ runner.arch }} | |
- name: Cache Puppeteer | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/puppeteer/ | |
key: puppeteer-${{ runner.os }}-${{ runner.arch }}-${{ env.PUPPETEER_VERSION }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Lint | |
run: npm run lint | |
- name: Test | |
run: npm run test | |
- name: Codecov | |
uses: codecov/codecov-action@v5 | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
integration: | |
runs-on: ${{ matrix.os }} | |
needs: | |
- build | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
puppeteer-version: | |
- '22.0.0' | |
- '22.1.0' | |
- '22.2.0' | |
- '22.3.0' | |
- '22.4.1' | |
- '22.5.0' | |
- '22.6.5' | |
- '22.7.1' | |
- '22.8.2' | |
- '22.9.0' | |
- '22.10.1' | |
- '22.11.2' | |
- '22.12.1' | |
- '22.13.1' | |
- '22.14.0' | |
- '22.15.0' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js LTS | |
uses: actions/setup-node@v4 | |
with: | |
registry-url: https://registry.npmjs.org | |
node-version: lts/* | |
- name: Get npm cache location | |
id: get-npm-cache | |
shell: bash | |
run: | | |
echo "NPM_CONFIG_CACHE=$(npm config get cache)" >> "$GITHUB_ENV" | |
echo "npm_config_cache=$(npm config get cache)" >> "$GITHUB_OUTPUT" | |
- name: Cache npm packages | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.get-npm-cache.outputs.npm_config_cache }} | |
key: npm-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: npm-${{ runner.os }}-${{ runner.arch }} | |
# NOTE: Chrome r112.0.5615.121 is not available on https://edgedl.me.gvt1.com, use 113.0.5672.63 from 20.1.0 | |
- name: Override Chrome revision (for puppeteer@20.0.0) | |
if: ${{ matrix.puppeteer-version == '20.0.0' }} | |
shell: bash | |
run: | | |
echo "PUPPETEER_BROWSER_REVISION=113.0.5672.63" >> $GITHUB_ENV | |
- name: Cache Puppeteer | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/puppeteer/ | |
key: puppeteer-${{ runner.os }}-${{ runner.arch }}-${{ matrix.puppeteer-version }} | |
- name: Install Puppeteer ${{ matrix.puppeteer-version }} | |
run: npm install 'puppeteer@${{ matrix.puppeteer-version }}' 'puppeteer-core@${{ matrix.puppeteer-version }}' | |
- name: Install dependencies | |
run: npm ci | |
- name: Verify the Puppeteer and Puppeteer-Core versions | |
run: | | |
node -e "process.exit(require('puppeteer/package.json').version == '${{ matrix.puppeteer-version }}' ? 0 : 1)" | |
node -e "process.exit(require('puppeteer-core/package.json').version == '${{ matrix.puppeteer-version }}' ? 0 : 1)" | |
- name: Test | |
env: | |
DEBUG: "puppeteer:protocol:*" | |
DEBUG_MAX_STRING_LENGTH: "null" | |
run: npm run test | |
github-pages: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Git Hub Pages | |
uses: actions/configure-pages@v5 | |
- name: Build GitHub Pages | |
run: | | |
sudo apt-get install -y pandoc | |
mkdir -p build/gh-pages | |
pandoc \ | |
-f gfm -t html5 -s --shift-heading-level-by=-1 --lua-filter=gh-pages/filter.lua -H gh-pages/header.html \ | |
-o build/gh-pages/index.html gh-pages/metadata.md README.md | |
- name: Upload GitHub Pages artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: build/gh-pages | |
publish-github-pages: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
needs: | |
- github-pages | |
environment: | |
name: github-pages | |
url: ${{ steps.publish-github-pages.outputs.page_url }} | |
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }} | |
steps: | |
- name: Set up Git Hub Pages | |
uses: actions/configure-pages@v5 | |
- name: Publish GitHub Pages | |
id: publish-github-pages | |
uses: actions/deploy-pages@v4 |