mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
75 lines
2.8 KiB
YAML
75 lines
2.8 KiB
YAML
name: Puppeteer Canary CI
|
|
|
|
# Declare default permissions as read only.
|
|
permissions: read-all
|
|
|
|
on:
|
|
schedule:
|
|
# Run everyday at: https://crontab.guru/#0_8_*_*_*.
|
|
- cron: '0 8 * * *'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
canary-chrome-tests:
|
|
name: ${{ matrix.suite }} tests on ${{ matrix.os }} (${{ matrix.shard }}) ${{ matrix.configs }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
suite:
|
|
- chrome-headless
|
|
- chrome-headful
|
|
- chrome-headless-shell
|
|
- chrome-bidi
|
|
os:
|
|
- ubuntu-latest
|
|
- windows-latest
|
|
- macos-latest
|
|
shard:
|
|
- 1-2
|
|
- 2-2
|
|
configs:
|
|
- experimental
|
|
- stable
|
|
exclude:
|
|
- os: windows-latest
|
|
suite: chrome-bidi
|
|
- os: macos-latest
|
|
suite: chrome-headful
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
|
with:
|
|
cache: npm
|
|
node-version-file: '.nvmrc'
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
env:
|
|
PUPPETEER_SKIP_DOWNLOAD: true
|
|
# Set up GitHub Actions caching for Wireit.
|
|
- uses: google/wireit@4aad131006ea85c1e42af927534ebb13426dd730 # setup-github-actions-caching/v1.0.2
|
|
- name: Build packages
|
|
run: npm run build --workspace @puppeteer-test/test
|
|
- name: Install Chrome Canary
|
|
id: browser
|
|
run: node tools/download_chrome_canary.mjs $HOME/.cache/puppeteer/chrome-canary
|
|
- name: Run all tests (for non-Linux)
|
|
if: ${{ matrix.os != 'ubuntu-latest' }}
|
|
run: npm run test -- --shard '${{ matrix.shard }}' --test-suite ${{ matrix.suite }} --save-stats-to /tmp/artifacts/${{ github.event_name }}_INSERTID.json
|
|
env:
|
|
PUPPETEER_EXECUTABLE_PATH: ${{ steps.browser.outputs.executablePath }}
|
|
PUPPETEER_TEST_EXPERIMENTAL_CHROME_FEATURES: ${{ matrix.configs == 'experimental' }}
|
|
- name: Run all tests (for Linux)
|
|
if: ${{ matrix.os == 'ubuntu-latest' }}
|
|
run: xvfb-run --auto-servernum npm run test -- --shard '${{ matrix.shard }}' --test-suite ${{ matrix.suite }} --save-stats-to /tmp/artifacts/${{ github.event_name }}_INSERTID.json
|
|
env:
|
|
PUPPETEER_EXECUTABLE_PATH: ${{ steps.browser.outputs.executablePath }}
|
|
PUPPETEER_TEST_EXPERIMENTAL_CHROME_FEATURES: ${{ matrix.configs == 'experimental' }}
|
|
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
|
if: always()
|
|
with:
|
|
name: test-results-${{ matrix.os }}-${{ matrix.suite }}-${{ matrix.shard }}-${{ matrix.configs }}
|
|
path: /tmp/artifacts/*.json
|