Repository navigation
chore(playwright): upgrade to playwright v1.62.1 #34
This file contains hidden or 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: "Playwright for Cloudflare - PR Package Preview" | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - '.github/scripts/comment-package-preview.cjs' | |
| - '.github/workflows/cf_playwright_*.yml' | |
| - '.npmrc' | |
| - 'package.json' | |
| - 'packages/browser-test-runtime/**' | |
| - 'packages/playwright-cloudflare/**' | |
| - 'patches/playwright.patch' | |
| - 'scripts/**' | |
| - 'submodules/playwright' | |
| - 'submodules/jest' | |
| workflow_dispatch: | |
| concurrency: | |
| group: cf-playwright-preview-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| preview: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22.x' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Validate package | |
| run: | | |
| npm ci | |
| git submodule update --init | |
| npm run check:patch:playwright | |
| npm run build --workspace @cloudflare/playwright | |
| npm run test:bundle --workspace @cloudflare/playwright | |
| npm ci --prefix packages/playwright-cloudflare/tests | |
| npm --prefix packages/playwright-cloudflare/tests run test-types | |
| npm run check:submodules | |
| # Non-blocking so that a pkg.pr.new outage does not fail validation. | |
| # --no-compact prints the repository-qualified URL, which works before | |
| # this repository's releases are the npm `latest` versions. | |
| - name: Publish package preview | |
| id: publish | |
| continue-on-error: true | |
| run: npm exec -- pkg-pr-new publish --no-compact --comment=off --json="$RUNNER_TEMP/pkg-pr-new.json" packages/playwright-cloudflare | |
| # One comment per package; a new push or rerun updates only this one. | |
| # Fork pull requests get a read-only token, so the step cannot comment. | |
| - name: Comment install URL on the pull request | |
| if: github.event_name == 'pull_request' && steps.publish.outcome == 'success' | |
| continue-on-error: true | |
| uses: actions/github-script@v7 | |
| env: | |
| PREVIEW_JSON: ${{ runner.temp }}/pkg-pr-new.json | |
| with: | |
| script: | | |
| const commentPackagePreview = require(`${process.env.GITHUB_WORKSPACE}/.github/scripts/comment-package-preview.cjs`); | |
| await commentPackagePreview({github, context, core}); |