(imp) puppeteer v23.11.1 #151
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: 23.11.1 | |
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: | |
- '23.10.4' | |
- '23.11.1' | |
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 }} | |
- 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 |