참고소스 수정본
This commit is contained in:
101
참고/playwright-main/.github/ISSUE_TEMPLATE/bug.yml
vendored
Normal file
101
참고/playwright-main/.github/ISSUE_TEMPLATE/bug.yml
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
name: Bug Report 🪲
|
||||
description: Create a bug report to help us improve
|
||||
title: '[Bug]: '
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
# Please follow these steps first:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Troubleshoot
|
||||
If Playwright is not behaving the way you expect, we'd ask you to look at the [documentation](https://playwright.dev/docs/intro) and search the issue tracker for evidence supporting your expectation.
|
||||
Please make reasonable efforts to troubleshoot and rule out issues with your code, the configuration, or any 3rd party libraries you might be using.
|
||||
Playwright offers [several debugging tools](https://playwright.dev/docs/debug) that you can use to troubleshoot your issues.
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Ask for help through appropriate channels
|
||||
If you feel unsure about the cause of the problem, consider asking for help on for example [StackOverflow](https://stackoverflow.com/questions/ask) or our [Discord channel](https://aka.ms/playwright/discord) before posting a bug report. The issue tracker is not a help forum.
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Make a minimal reproduction
|
||||
To file the report, you will need a GitHub repository with a minimal (but complete) example and simple/clear steps on how to reproduce the bug.
|
||||
The simpler you can make it, the more likely we are to successfully verify and fix the bug. You can create a new project with `npm init playwright@latest new-project` and then add the test code there.
|
||||
Please make sure you only include the code and the dependencies absolutely necessary for your repro. Due to the security considerations, we can only run the code we trust. Major web frameworks are Ok to use, but smaller convenience libraries are not.
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
> [!IMPORTANT]
|
||||
> Bug reports without a minimal reproduction will be rejected.
|
||||
|
||||
---
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: Version
|
||||
description: |
|
||||
The version of Playwright you are using.
|
||||
Is it the [latest](https://github.com/microsoft/playwright/releases)? Test and see if the bug has already been fixed.
|
||||
placeholder: ex. 1.41.1
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduction
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: Please link to a repository with a minimal reproduction and describe accurately how we can reproduce/verify the bug.
|
||||
placeholder: |
|
||||
Example steps (replace with your own):
|
||||
1. Clone my repo at https://github.com/<myuser>/example
|
||||
2. npm install
|
||||
3. npm run test
|
||||
4. You should see the error come up
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
description: A description of what you expect to happen.
|
||||
placeholder: I expect to see X or Y
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: Actual behavior
|
||||
description: |
|
||||
A clear and concise description of the unexpected behavior.
|
||||
Please include any relevant output here, especially any error messages.
|
||||
placeholder: A bug happened!
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: context
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Anything else that might be relevant
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: envinfo
|
||||
attributes:
|
||||
label: Environment
|
||||
description: |
|
||||
Please paste the output of running `npx envinfo --preset playwright`.
|
||||
This will be automatically formatted as a code block, so no need for backticks.
|
||||
placeholder: |
|
||||
System:
|
||||
OS: Linux 6.2 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
|
||||
CPU: (8) arm64
|
||||
Binaries:
|
||||
Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node
|
||||
npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm
|
||||
npmPackages:
|
||||
@playwright/test: 1.41.1 => 1.41.1
|
||||
render: shell
|
||||
validations:
|
||||
required: true
|
||||
5
참고/playwright-main/.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
5
참고/playwright-main/.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Join our Discord Server
|
||||
url: https://aka.ms/playwright/discord
|
||||
about: Ask questions and discuss with other community members
|
||||
29
참고/playwright-main/.github/ISSUE_TEMPLATE/documentation.yml
vendored
Normal file
29
참고/playwright-main/.github/ISSUE_TEMPLATE/documentation.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Documentation 📖
|
||||
description: Submit a request to add or update documentation
|
||||
title: '[Docs]: '
|
||||
labels: ['Documentation :book:']
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
### Thank you for helping us improve our documentation!
|
||||
Please be sure you are looking at [the Next version of the documentation](https://playwright.dev/docs/next/intro) before opening an issue here.
|
||||
- type: textarea
|
||||
id: links
|
||||
attributes:
|
||||
label: Page(s)
|
||||
description: |
|
||||
Links to one or more documentation pages that should be modified.
|
||||
If you are reporting an issue with a specific section of a page, try to link directly to the nearest anchor.
|
||||
If you are suggesting that a new page be created, link to the parent of the proposed page.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Description
|
||||
description: |
|
||||
Describe the change you are requesting.
|
||||
If the issue pertains to a single function or matcher, be sure to specify the entire call signature.
|
||||
validations:
|
||||
required: true
|
||||
30
참고/playwright-main/.github/ISSUE_TEMPLATE/feature.yml
vendored
Normal file
30
참고/playwright-main/.github/ISSUE_TEMPLATE/feature.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Feature Request 🚀
|
||||
description: Submit a proposal for a new feature
|
||||
title: '[Feature]: '
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
### Thank you for taking the time to suggest a new feature!
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: '🚀 Feature Request'
|
||||
description: A clear and concise description of what the feature is.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: example
|
||||
attributes:
|
||||
label: Example
|
||||
description: Describe how this feature would be used.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: motivation
|
||||
attributes:
|
||||
label: Motivation
|
||||
description: |
|
||||
Outline your motivation for the proposal. How will it make Playwright better?
|
||||
validations:
|
||||
required: true
|
||||
27
참고/playwright-main/.github/ISSUE_TEMPLATE/question.yml
vendored
Normal file
27
참고/playwright-main/.github/ISSUE_TEMPLATE/question.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
name: 'Questions / Help 💬'
|
||||
description: If you have questions, please check StackOverflow or Discord
|
||||
title: '[Please read the message below]'
|
||||
labels: [':speech_balloon: Question']
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Questions and Help 💬
|
||||
|
||||
This issue tracker is reserved for bug reports and feature requests.
|
||||
|
||||
For anything else, such as questions or getting help, please see:
|
||||
|
||||
- [The Playwright documentation](https://playwright.dev)
|
||||
- [Our Discord server](https://aka.ms/playwright/discord)
|
||||
- type: checkboxes
|
||||
id: no-post
|
||||
attributes:
|
||||
label: |
|
||||
Please do not submit this issue.
|
||||
description: |
|
||||
> [!IMPORTANT]
|
||||
> This issue will be closed.
|
||||
options:
|
||||
- label: I understand that this issue will be closed
|
||||
required: true
|
||||
95
참고/playwright-main/.github/ISSUE_TEMPLATE/regression.yml
vendored
Normal file
95
참고/playwright-main/.github/ISSUE_TEMPLATE/regression.yml
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
name: Report regression
|
||||
description: Functionality that used to work and does not any more
|
||||
title: "[Regression]: "
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
# Please follow these steps first:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Make a minimal reproduction
|
||||
To file the report, you will need a GitHub repository with a minimal (but complete) example and simple/clear steps on how to reproduce the regression.
|
||||
The simpler you can make it, the more likely we are to successfully verify and fix the regression.
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
> [!IMPORTANT]
|
||||
> Regression reports without a minimal reproduction will be rejected.
|
||||
|
||||
---
|
||||
- type: input
|
||||
id: goodVersion
|
||||
attributes:
|
||||
label: Last Good Version
|
||||
description: |
|
||||
Last version of Playwright where the feature was working.
|
||||
placeholder: ex. 1.40.1
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: badVersion
|
||||
attributes:
|
||||
label: First Bad Version
|
||||
description: |
|
||||
First version of Playwright where the feature was broken.
|
||||
Is it the [latest](https://github.com/microsoft/playwright/releases)? Test and see if the regression has already been fixed.
|
||||
placeholder: ex. 1.41.1
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduction
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: Please link to a repository with a minimal reproduction and describe accurately how we can reproduce/verify the bug.
|
||||
placeholder: |
|
||||
Example steps (replace with your own):
|
||||
1. Clone my repo at https://github.com/<myuser>/example
|
||||
2. npm install
|
||||
3. npm run test
|
||||
4. You should see the error come up
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
description: A description of what you expect to happen.
|
||||
placeholder: I expect to see X or Y
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: Actual behavior
|
||||
description: A clear and concise description of the unexpected behavior.
|
||||
placeholder: A bug happened!
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: context
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Anything else that might be relevant
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: envinfo
|
||||
attributes:
|
||||
label: Environment
|
||||
description: |
|
||||
Please paste the output of running `npx envinfo --preset playwright`.
|
||||
This will be automatically formatted as a code block, so no need for backticks.
|
||||
placeholder: |
|
||||
System:
|
||||
OS: Linux 6.2 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
|
||||
CPU: (8) arm64
|
||||
Binaries:
|
||||
Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node
|
||||
npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm
|
||||
npmPackages:
|
||||
@playwright/test: 1.41.1 => 1.41.1
|
||||
render: shell
|
||||
validations:
|
||||
required: true
|
||||
46
참고/playwright-main/.github/actions/download-artifact/action.yml
vendored
Normal file
46
참고/playwright-main/.github/actions/download-artifact/action.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: 'Download artifacts'
|
||||
description: 'Download artifacts from GitHub'
|
||||
inputs:
|
||||
namePrefix:
|
||||
description: 'Name prefix of the artifacts to download'
|
||||
required: true
|
||||
default: 'blob-report'
|
||||
path:
|
||||
description: 'Directory with downloaded artifacts'
|
||||
required: true
|
||||
default: '.'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Create temp downloads dir
|
||||
shell: bash
|
||||
run: mkdir -p '${{ inputs.path }}/artifacts'
|
||||
- name: Download artifacts
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
console.log(`downloading artifacts for workflow_run: ${context.payload.workflow_run.id}`);
|
||||
console.log(`workflow_run: ${JSON.stringify(context.payload.workflow_run, null, 2)}`);
|
||||
const allArtifacts = await github.paginate(github.rest.actions.listWorkflowRunArtifacts, {
|
||||
...context.repo,
|
||||
run_id: context.payload.workflow_run.id
|
||||
});
|
||||
console.log('total = ', allArtifacts.length);
|
||||
const artifacts = allArtifacts.filter(a => a.name.startsWith('${{ inputs.namePrefix }}'));
|
||||
const fs = require('fs');
|
||||
for (const artifact of artifacts) {
|
||||
const result = await github.rest.actions.downloadArtifact({
|
||||
...context.repo,
|
||||
artifact_id: artifact.id,
|
||||
archive_format: 'zip'
|
||||
});
|
||||
console.log(`Downloaded ${artifact.name}.zip (${result.data.byteLength} bytes)`);
|
||||
fs.writeFileSync(`${{ inputs.path }}/artifacts/${artifact.name}.zip`, Buffer.from(result.data));
|
||||
}
|
||||
- name: Unzip artifacts
|
||||
shell: bash
|
||||
run: |
|
||||
if ls '${{ inputs.path }}/artifacts'/*.zip 1>/dev/null 2>&1; then
|
||||
unzip -n '${{ inputs.path }}/artifacts/*.zip' -d ${{ inputs.path }}
|
||||
fi
|
||||
rm -rf '${{ inputs.path }}/artifacts'
|
||||
25
참고/playwright-main/.github/actions/enable-microphone-access/action.yml
vendored
Normal file
25
참고/playwright-main/.github/actions/enable-microphone-access/action.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Enable Microphone Access (macOS)
|
||||
description: 'Allow microphone access to all apps on macOS'
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
# https://github.com/actions/runner-images/issues/9330
|
||||
- name: Allow microphone access to all apps
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "$(uname)" != "Darwin" ]]; then
|
||||
echo "Not macOS, exiting"
|
||||
exit 0
|
||||
fi
|
||||
echo "Allowing microphone access to all apps"
|
||||
version=$(sw_vers -productVersion | cut -d. -f1)
|
||||
if [[ "$version" == "14" || "$version" == "15" ]]; then
|
||||
sqlite3 $HOME/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT OR IGNORE INTO access VALUES ('kTCCServiceMicrophone','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159,NULL,NULL,'UNUSED',1687786159);"
|
||||
elif [[ "$version" == "12" || "$version" == "13" ]]; then
|
||||
sqlite3 $HOME/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT OR REPLACE INTO access VALUES('kTCCServiceMicrophone','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159);"
|
||||
else
|
||||
echo "Skipping unsupported macOS version $version"
|
||||
exit 0
|
||||
fi
|
||||
echo "Successfully allowed microphone access"
|
||||
95
참고/playwright-main/.github/actions/run-test/action.yml
vendored
Normal file
95
참고/playwright-main/.github/actions/run-test/action.yml
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
name: 'Run browser tests'
|
||||
description: 'Run browser tests'
|
||||
inputs:
|
||||
command:
|
||||
description: 'Command to run tests'
|
||||
required: true
|
||||
node-version:
|
||||
description: 'Node.js version to use'
|
||||
required: false
|
||||
default: '20'
|
||||
browsers-to-install:
|
||||
description: 'Browser to install. Default is all browsers.'
|
||||
required: false
|
||||
default: ''
|
||||
bot-name:
|
||||
description: 'Bot name'
|
||||
required: true
|
||||
shard-index:
|
||||
description: 'Shard index (optional)'
|
||||
required: false
|
||||
default: '0'
|
||||
shell:
|
||||
description: 'Shell to use'
|
||||
required: false
|
||||
default: 'bash'
|
||||
flakiness-client-id:
|
||||
description: 'Azure Flakiness Dashboard Client ID'
|
||||
required: false
|
||||
flakiness-tenant-id:
|
||||
description: 'Azure Flakiness Dashboard Tenant ID'
|
||||
required: false
|
||||
flakiness-subscription-id:
|
||||
description: 'Azure Flakiness Dashboard Subscription ID'
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ inputs.node-version }}
|
||||
- uses: ./.github/actions/enable-microphone-access
|
||||
- run: |
|
||||
echo "::group::npm ci"
|
||||
npm ci
|
||||
echo "::endgroup::"
|
||||
shell: bash
|
||||
- run: |
|
||||
echo "::group::npm run build"
|
||||
npm run build
|
||||
echo "::endgroup::"
|
||||
shell: bash
|
||||
- run: |
|
||||
echo "::group::npx playwright install --with-deps"
|
||||
npx playwright install --with-deps ${{ inputs.browsers-to-install }}
|
||||
echo "::endgroup::"
|
||||
shell: bash
|
||||
- run: echo "PLAYWRIGHT_SETUP_COMPLETE=true" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
- name: Run tests
|
||||
if: inputs.shell == 'bash'
|
||||
run: |
|
||||
if [[ "$(uname)" == "Linux" ]]; then
|
||||
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- ${{ inputs.command }}
|
||||
else
|
||||
${{ inputs.command }}
|
||||
fi
|
||||
shell: bash
|
||||
env:
|
||||
PW_TAG: "@${{ inputs.bot-name }}"
|
||||
- name: Run tests
|
||||
if: inputs.shell != 'bash'
|
||||
run: ${{ inputs.command }}
|
||||
shell: ${{ inputs.shell }}
|
||||
env:
|
||||
PW_TAG: "@${{ inputs.bot-name }}"
|
||||
- name: Azure Login
|
||||
uses: azure/login@v2
|
||||
if: ${{ !cancelled() && env.PLAYWRIGHT_SETUP_COMPLETE == 'true' && github.event_name == 'push' && github.repository == 'microsoft/playwright' }}
|
||||
with:
|
||||
client-id: ${{ inputs.flakiness-client-id }}
|
||||
tenant-id: ${{ inputs.flakiness-tenant-id }}
|
||||
subscription-id: ${{ inputs.flakiness-subscription-id }}
|
||||
- run: |
|
||||
echo "::group::./utils/upload_flakiness_dashboard.sh"
|
||||
./utils/upload_flakiness_dashboard.sh ./test-results/report.json
|
||||
echo "::endgroup::"
|
||||
if: ${{ !cancelled() && env.PLAYWRIGHT_SETUP_COMPLETE == 'true' }}
|
||||
shell: bash
|
||||
- name: Upload blob report
|
||||
if: ${{ !cancelled() && env.PLAYWRIGHT_SETUP_COMPLETE == 'true' && (github.event_name == 'pull_request' || failure()) }}
|
||||
uses: ./.github/actions/upload-blob-report
|
||||
with:
|
||||
report_dir: blob-report
|
||||
job_name: ${{ inputs.bot-name }}-${{ inputs.shard-index }}
|
||||
25
참고/playwright-main/.github/actions/upload-blob-report/action.yml
vendored
Normal file
25
참고/playwright-main/.github/actions/upload-blob-report/action.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: 'Upload blob report'
|
||||
description: 'Upload blob report to GitHub artifacts'
|
||||
inputs:
|
||||
report_dir:
|
||||
description: 'Directory containing blob report'
|
||||
required: true
|
||||
default: 'test-results/blob-report'
|
||||
job_name:
|
||||
description: 'Unique job name'
|
||||
required: true
|
||||
default: ''
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Integrity check
|
||||
shell: bash
|
||||
run: find "${{ inputs.report_dir }}" -name "*.zip" -exec unzip -t {} \;
|
||||
- name: Upload blob report to GitHub
|
||||
if: ${{ !cancelled() }}
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: blob-report-${{ inputs.job_name }}
|
||||
path: ${{ inputs.report_dir }}/**
|
||||
retention-days: 7
|
||||
overwrite: true
|
||||
10
참고/playwright-main/.github/copilot-instructions.md
vendored
Normal file
10
참고/playwright-main/.github/copilot-instructions.md
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
## PR Review Guidelines
|
||||
|
||||
When reviewing pull requests:
|
||||
|
||||
- Only comment on semantically meaningful issues: bugs, incorrect logic, security problems, or API contract violations.
|
||||
- Skip style, formatting, naming, and whitespace observations unless they cause functional problems.
|
||||
- Keep each comment short — one or two sentences maximum.
|
||||
- Do not write long descriptions or summaries of what the code does.
|
||||
- Do not suggest refactors or improvements unrelated to the PR's stated goal.
|
||||
- NEVER produce a review body or top-level PR overview comment. The review body MUST be empty. Put findings only in inline comments on specific lines.
|
||||
17
참고/playwright-main/.github/workflows/copilot-setup-steps.yml
vendored
Normal file
17
참고/playwright-main/.github/workflows/copilot-setup-steps.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
name: "Copilot Setup Steps"
|
||||
on: workflow_dispatch
|
||||
jobs:
|
||||
copilot-setup-steps:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: "22"
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- run: npx playwright install --with-deps
|
||||
71
참고/playwright-main/.github/workflows/create_test_report.yml
vendored
Normal file
71
참고/playwright-main/.github/workflows/create_test_report.yml
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
name: Publish Test Results
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["tests 1", "tests 2", "tests others", "MCP"]
|
||||
types:
|
||||
- completed
|
||||
jobs:
|
||||
merge-reports:
|
||||
permissions:
|
||||
pull-requests: write
|
||||
checks: write
|
||||
statuses: write
|
||||
id-token: write # This is required for OIDC login (azure/login) to succeed
|
||||
contents: read # This is required for actions/checkout to succeed
|
||||
if: ${{ github.event.workflow_run.event == 'pull_request' || github.event.workflow_run.event == 'push' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
- run: npm ci
|
||||
env:
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
- run: npm run build
|
||||
|
||||
- name: Download blob report artifact
|
||||
uses: ./.github/actions/download-artifact
|
||||
with:
|
||||
namePrefix: 'blob-report'
|
||||
path: 'all-blob-reports'
|
||||
|
||||
- name: Merge reports
|
||||
run: |
|
||||
npx playwright merge-reports --config .github/workflows/merge.config.ts ./all-blob-reports
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NODE_OPTIONS: --max-old-space-size=8192
|
||||
HTML_REPORT_URL: 'https://mspwblobreport.z1.web.core.windows.net/run-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}-${{ github.sha }}/index.html'
|
||||
WORKFLOW_RUN_CONCLUSION: ${{ github.event.workflow_run.conclusion }}
|
||||
|
||||
- name: Azure Login
|
||||
uses: azure/login@v3
|
||||
with:
|
||||
client-id: ${{ secrets.AZURE_BLOB_REPORTS_CLIENT_ID }}
|
||||
tenant-id: ${{ secrets.AZURE_BLOB_REPORTS_TENANT_ID }}
|
||||
subscription-id: ${{ secrets.AZURE_BLOB_REPORTS_SUBSCRIPTION_ID }}
|
||||
|
||||
- name: Upload HTML report to Azure
|
||||
id: upload-report
|
||||
run: |
|
||||
REPORT_DIR='run-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}-${{ github.sha }}'
|
||||
azcopy cp --recursive "./playwright-report/*" "https://mspwblobreport.blob.core.windows.net/\$web/$REPORT_DIR"
|
||||
REPORT_URL="https://mspwblobreport.z1.web.core.windows.net/$REPORT_DIR/index.html"
|
||||
echo "Report url: $REPORT_URL"
|
||||
echo "reportUrl=$REPORT_URL" >> "$GITHUB_OUTPUT"
|
||||
env:
|
||||
AZCOPY_AUTO_LOGIN_TYPE: AZCLI
|
||||
|
||||
- name: Publish Report URL as Commit Status
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
await github.rest.repos.createCommitStatus({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
sha: '${{ github.event.workflow_run.head_sha }}',
|
||||
state: 'success',
|
||||
target_url: '${{ steps.upload-report.outputs.reportUrl }}',
|
||||
context: 'HTML Report (${{ github.event.workflow_run.name }})',
|
||||
});
|
||||
61
참고/playwright-main/.github/workflows/infra.yml
vendored
Normal file
61
참고/playwright-main/.github/workflows/infra.yml
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
name: "infra"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release-*
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- release-*
|
||||
|
||||
env:
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
|
||||
jobs:
|
||||
doc-and-lint:
|
||||
name: "docs & lint"
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- run: npx playwright install --with-deps
|
||||
- run: npm run lint
|
||||
- name: Verify clean tree
|
||||
run: |
|
||||
if [[ -n $(git status -s) ]]; then
|
||||
echo "ERROR: tree is dirty after npm run build:"
|
||||
git diff
|
||||
exit 1
|
||||
fi
|
||||
- name: Audit prod NPM dependencies
|
||||
run: node utils/check_audit.js
|
||||
continue-on-error: true
|
||||
lint-snippets:
|
||||
name: "Lint snippets"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- uses: actions/setup-dotnet@v5
|
||||
with:
|
||||
dotnet-version: 8.0.x
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: '21'
|
||||
- run: npm ci
|
||||
- run: pip install -r utils/doclint/linting-code-snippets/python/requirements.txt
|
||||
- run: mvn package
|
||||
working-directory: utils/doclint/linting-code-snippets/java
|
||||
- run: node utils/doclint/linting-code-snippets/cli.js
|
||||
4
참고/playwright-main/.github/workflows/merge.config.ts
vendored
Normal file
4
참고/playwright-main/.github/workflows/merge.config.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export default {
|
||||
testDir: '../../tests',
|
||||
reporter: [[require.resolve('../../tests/config/ghaMarkdownReporter')], ['html']]
|
||||
};
|
||||
74
참고/playwright-main/.github/workflows/pr_check_client_side_changes.yml
vendored
Normal file
74
참고/playwright-main/.github/workflows/pr_check_client_side_changes.yml
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
name: "Check client side changes"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'docs/src/api/**/*'
|
||||
- 'packages/playwright-core/src/client/**/*'
|
||||
- 'packages/isomorphic/**/*'
|
||||
- 'packages/playwright/src/matchers/matchers.ts'
|
||||
- 'packages/protocol/spec/**/*.yml'
|
||||
jobs:
|
||||
check:
|
||||
name: Check
|
||||
runs-on: ubuntu-24.04
|
||||
if: github.repository == 'microsoft/playwright'
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/create-github-app-token@v3
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.PLAYWRIGHT_APP_ID }}
|
||||
private-key: ${{ secrets.PLAYWRIGHT_PRIVATE_KEY }}
|
||||
repositories: |
|
||||
playwright
|
||||
playwright-python
|
||||
playwright-java
|
||||
playwright-dotnet
|
||||
- name: Create GitHub issue
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
github-token: ${{ steps.app-token.outputs.token }}
|
||||
script: |
|
||||
const currentPlaywrightVersion = require('./package.json').version.match(/\d+\.\d+/)[0];
|
||||
const { data } = await github.rest.git.getCommit({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
commit_sha: context.sha,
|
||||
});
|
||||
const commitHeader = data.message.split('\n')[0];
|
||||
const prMatch = commitHeader.match(/#(\d+)/);
|
||||
const formattedCommit = prMatch
|
||||
? `https://github.com/microsoft/playwright/pull/${prMatch[1]}`
|
||||
: `https://github.com/${context.repo.owner}/${context.repo.repo}/commit/${context.sha} (${commitHeader})`;
|
||||
|
||||
const title = '[Ports]: Backport client side changes for ' + currentPlaywrightVersion;
|
||||
for (const repo of ['playwright-python', 'playwright-java', 'playwright-dotnet']) {
|
||||
const { data: issuesData } = await github.rest.search.issuesAndPullRequests({
|
||||
q: `is:issue is:open repo:microsoft/${repo} in:title "${title}"`
|
||||
})
|
||||
let issueNumber = null;
|
||||
let issueBody = '';
|
||||
if (issuesData.total_count > 0) {
|
||||
issueNumber = issuesData.items[0].number
|
||||
issueBody = issuesData.items[0].body
|
||||
} else {
|
||||
const { data: issueCreateData } = await github.rest.issues.create({
|
||||
owner: context.repo.owner,
|
||||
repo: repo,
|
||||
title,
|
||||
body: 'Please backport client side changes: \n',
|
||||
});
|
||||
issueNumber = issueCreateData.number;
|
||||
issueBody = issueCreateData.body;
|
||||
}
|
||||
const newBody = issueBody.trimEnd() + `
|
||||
- [ ] ${formattedCommit}`;
|
||||
const data = await github.rest.issues.update({
|
||||
owner: context.repo.owner,
|
||||
repo: repo,
|
||||
issue_number: issueNumber,
|
||||
body: newBody
|
||||
})
|
||||
}
|
||||
76
참고/playwright-main/.github/workflows/publish_extension.yml
vendored
Normal file
76
참고/playwright-main/.github/workflows/publish_extension.yml
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
name: Publish Extension to Chrome Web Store
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
publish-extension-chrome-web-store:
|
||||
runs-on: ubuntu-latest
|
||||
environment: allow-publishing-extension-to-cws
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
cache: 'npm'
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Build extension
|
||||
run: npm run build
|
||||
- name: Package extension
|
||||
working-directory: ./packages/extension
|
||||
run: |
|
||||
cd dist
|
||||
zip -r ../extension.zip .
|
||||
- name: Get access token
|
||||
id: auth
|
||||
run: |
|
||||
ACCESS_TOKEN=$(curl -s -X POST "https://oauth2.googleapis.com/token" \
|
||||
-d "client_id=${{ secrets.CHROME_CLIENT_ID }}" \
|
||||
-d "client_secret=${{ secrets.CHROME_CLIENT_SECRET }}" \
|
||||
-d "refresh_token=${{ secrets.CHROME_REFRESH_TOKEN }}" \
|
||||
-d "grant_type=refresh_token" | jq -r '.access_token')
|
||||
if [ "$ACCESS_TOKEN" = "null" ] || [ -z "$ACCESS_TOKEN" ]; then
|
||||
echo "Failed to obtain access token"
|
||||
exit 1
|
||||
fi
|
||||
echo "::add-mask::$ACCESS_TOKEN"
|
||||
echo "access_token=$ACCESS_TOKEN" >> $GITHUB_OUTPUT
|
||||
- name: Upload to Chrome Web Store
|
||||
run: |
|
||||
RESPONSE=$(curl -s -w "\n%{http_code}" \
|
||||
-X PUT "https://www.googleapis.com/upload/chromewebstore/v1.1/items/${{ secrets.CHROME_EXTENSION_ID }}" \
|
||||
-H "Authorization: Bearer ${{ steps.auth.outputs.access_token }}" \
|
||||
-H "x-goog-api-version: 2" \
|
||||
-T ./packages/extension/extension.zip)
|
||||
HTTP_CODE=$(echo "$RESPONSE" | tail -1)
|
||||
BODY=$(echo "$RESPONSE" | head -n -1)
|
||||
echo "$BODY"
|
||||
if [ "$HTTP_CODE" -ne 200 ]; then
|
||||
echo "Upload failed with HTTP $HTTP_CODE"
|
||||
exit 1
|
||||
fi
|
||||
STATUS=$(echo "$BODY" | jq -r '.uploadState')
|
||||
if [ "$STATUS" != "SUCCESS" ]; then
|
||||
echo "Upload state: $STATUS"
|
||||
exit 1
|
||||
fi
|
||||
- name: Publish to Chrome Web Store
|
||||
run: |
|
||||
RESPONSE=$(curl -s -w "\n%{http_code}" \
|
||||
-X POST "https://www.googleapis.com/chromewebstore/v1.1/items/${{ secrets.CHROME_EXTENSION_ID }}/publish" \
|
||||
-H "Authorization: Bearer ${{ steps.auth.outputs.access_token }}" \
|
||||
-H "x-goog-api-version: 2" \
|
||||
-H "Content-Length: 0")
|
||||
HTTP_CODE=$(echo "$RESPONSE" | tail -1)
|
||||
BODY=$(echo "$RESPONSE" | head -n -1)
|
||||
echo "$BODY"
|
||||
if [ "$HTTP_CODE" -ne 200 ]; then
|
||||
echo "Publish failed with HTTP $HTTP_CODE"
|
||||
exit 1
|
||||
fi
|
||||
STATUS=$(echo "$BODY" | jq -r '.status[0]')
|
||||
if [ "$STATUS" != "OK" ] && [ "$STATUS" != "PUBLISHED_WITH_FRICTION_WARNING" ]; then
|
||||
echo "Publish status: $STATUS"
|
||||
exit 1
|
||||
fi
|
||||
echo "Extension published successfully"
|
||||
103
참고/playwright-main/.github/workflows/publish_release.yml
vendored
Normal file
103
참고/playwright-main/.github/workflows/publish_release.yml
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
name: "publish release - npm, driver, trace viewer"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "10 5 * * *"
|
||||
push:
|
||||
branches:
|
||||
- release-*
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
env:
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
|
||||
jobs:
|
||||
publish-npm-and-driver:
|
||||
name: "publish NPM and driver"
|
||||
runs-on: ubuntu-24.04
|
||||
if: github.repository == 'microsoft/playwright'
|
||||
permissions:
|
||||
id-token: write # This is required for OIDC login (azure/login, NPM publish) to succeed
|
||||
contents: read # This is required for actions/checkout to succeed
|
||||
environment: allow-publish-driver-to-cdn # This is required for OIDC login (azure/login)
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
# Ensure npm 11.5.1 or later is installed (for OIDC npm publishing)
|
||||
- name: Update npm
|
||||
run: npm install -g npm@latest
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
|
||||
- name: "@next: publish with commit timestamp (triggered manually)"
|
||||
if: contains(github.ref, 'main') && github.event_name == 'workflow_dispatch'
|
||||
run: |
|
||||
node utils/build/update_canary_version.js --alpha --commit-timestamp
|
||||
utils/publish_all_packages.sh --alpha
|
||||
- name: "@next: publish with today's date (triggered automatically)"
|
||||
if: contains(github.ref, 'main') && github.event.schedule
|
||||
run: |
|
||||
node utils/build/update_canary_version.js --alpha --today-date
|
||||
utils/publish_all_packages.sh --alpha
|
||||
- name: "@beta: publish with commit timestamp (triggered automatically)"
|
||||
if: contains(github.ref, 'release') && github.event_name == 'push'
|
||||
run: |
|
||||
node utils/build/update_canary_version.js --beta --commit-timestamp
|
||||
utils/publish_all_packages.sh --beta
|
||||
- name: "publish release to NPM"
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
run: utils/publish_all_packages.sh --release
|
||||
|
||||
- name: Azure Login
|
||||
uses: azure/login@v3
|
||||
with:
|
||||
client-id: ${{ secrets.AZURE_PW_CDN_CLIENT_ID }}
|
||||
tenant-id: ${{ secrets.AZURE_PW_CDN_TENANT_ID }}
|
||||
subscription-id: ${{ secrets.AZURE_PW_CDN_SUBSCRIPTION_ID }}
|
||||
- name: build & publish driver
|
||||
env:
|
||||
AZ_UPLOAD_FOLDER: ${{ github.event_name == 'release' && 'driver' || 'driver/next' }}
|
||||
run: |
|
||||
utils/build/build-playwright-driver.sh
|
||||
utils/build/upload-playwright-driver.sh
|
||||
|
||||
publish-trace-viewer:
|
||||
name: "publish Trace Viewer to trace.playwright.dev"
|
||||
runs-on: ubuntu-24.04
|
||||
if: github.repository == 'microsoft/playwright'
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
- uses: actions/create-github-app-token@v3
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.PLAYWRIGHT_APP_ID }}
|
||||
private-key: ${{ secrets.PLAYWRIGHT_PRIVATE_KEY }}
|
||||
repositories: trace.playwright.dev
|
||||
- name: Deploy Canary
|
||||
if: contains(github.ref, 'main') && github.event.schedule
|
||||
run: bash utils/build/deploy-trace-viewer.sh --canary
|
||||
env:
|
||||
GH_SERVICE_ACCOUNT_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
- name: Deploy Beta
|
||||
if: contains(github.ref, 'release') && github.event_name == 'push'
|
||||
run: bash utils/build/deploy-trace-viewer.sh --beta
|
||||
env:
|
||||
GH_SERVICE_ACCOUNT_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
- name: Deploy Stable
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
run: bash utils/build/deploy-trace-viewer.sh --stable
|
||||
env:
|
||||
GH_SERVICE_ACCOUNT_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
- name: Deploy Stable (manually)
|
||||
if: contains(github.ref, 'release') && github.event_name == 'workflow_dispatch'
|
||||
run: bash utils/build/deploy-trace-viewer.sh --stable
|
||||
env:
|
||||
GH_SERVICE_ACCOUNT_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
40
참고/playwright-main/.github/workflows/publish_release_docker.yml
vendored
Normal file
40
참고/playwright-main/.github/workflows/publish_release_docker.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: "publish release - Docker"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
env:
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
|
||||
jobs:
|
||||
publish-docker-release:
|
||||
name: "publish to DockerHub"
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
id-token: write # This is required for OIDC login (azure/login) to succeed
|
||||
contents: read # This is required for actions/checkout to succeed
|
||||
if: github.repository == 'microsoft/playwright'
|
||||
environment: allow-publishing-docker-to-acr
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- name: Set up Docker QEMU for arm64 docker builds
|
||||
uses: docker/setup-qemu-action@v4
|
||||
with:
|
||||
platforms: arm64
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- name: Azure Login
|
||||
uses: azure/login@v3
|
||||
with:
|
||||
client-id: ${{ secrets.AZURE_DOCKER_CLIENT_ID }}
|
||||
tenant-id: ${{ secrets.AZURE_DOCKER_TENANT_ID }}
|
||||
subscription-id: ${{ secrets.AZURE_DOCKER_SUBSCRIPTION_ID }}
|
||||
- name: Login to ACR via OIDC
|
||||
run: az acr login --name playwright
|
||||
- run: ./utils/docker/publish_docker.sh stable
|
||||
78
참고/playwright-main/.github/workflows/roll_browser_into_playwright.yml
vendored
Normal file
78
참고/playwright-main/.github/workflows/roll_browser_into_playwright.yml
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
name: Roll Browser into Playwright
|
||||
|
||||
on:
|
||||
repository_dispatch:
|
||||
types: [roll_into_pw]
|
||||
|
||||
env:
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
BROWSER: ${{ github.event.client_payload.browser }}
|
||||
REVISION: ${{ github.event.client_payload.revision }}
|
||||
BROWSER_VERSION: ${{ github.event.client_payload.browserVersion }}
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
concurrency:
|
||||
group: 'roll-browser-into-playwright-${{ github.event.client_payload.browser }}-${{ github.event.client_payload.revision }}'
|
||||
|
||||
jobs:
|
||||
roll:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- name: Install dependencies
|
||||
run: npx playwright install-deps
|
||||
- name: Roll to new revision
|
||||
run: |
|
||||
./utils/roll_browser.js $BROWSER $REVISION $BROWSER_VERSION
|
||||
npm run build
|
||||
- name: Prepare branch
|
||||
id: prepare-branch
|
||||
run: |
|
||||
BRANCH_NAME="roll-into-pw-${BROWSER}/${REVISION}"
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_OUTPUT
|
||||
|
||||
git fetch origin $BRANCH_NAME:$BRANCH_NAME || true
|
||||
if git show-ref --verify --quiet refs/heads/$BRANCH_NAME; then
|
||||
echo "exists=1" >> $GITHUB_OUTPUT
|
||||
echo "branch $BRANCH_NAME already exists, exiting"
|
||||
exit 0
|
||||
fi
|
||||
echo "exists=0" >> $GITHUB_OUTPUT
|
||||
|
||||
git config --global user.name microsoft-playwright-automation[bot]
|
||||
git config --global user.email 203992400+microsoft-playwright-automation[bot]@users.noreply.github.com
|
||||
git checkout -b "$BRANCH_NAME"
|
||||
git add .
|
||||
git commit -m "feat(${BROWSER}): roll to r${REVISION}"
|
||||
git push origin $BRANCH_NAME --force
|
||||
- uses: actions/create-github-app-token@v3
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.PLAYWRIGHT_APP_ID }}
|
||||
private-key: ${{ secrets.PLAYWRIGHT_PRIVATE_KEY }}
|
||||
- name: Create Pull Request
|
||||
uses: actions/github-script@v8
|
||||
if: ${{ steps.prepare-branch.outputs.exists == '0' }}
|
||||
with:
|
||||
github-token: ${{ steps.app-token.outputs.token }}
|
||||
script: |
|
||||
const response = await github.rest.pulls.create({
|
||||
owner: 'microsoft',
|
||||
repo: 'playwright',
|
||||
head: 'microsoft:${{ steps.prepare-branch.outputs.BRANCH_NAME }}',
|
||||
base: 'main',
|
||||
title: 'feat(${{ env.BROWSER }}): roll to r${{ env.REVISION }}',
|
||||
});
|
||||
await github.rest.issues.addLabels({
|
||||
owner: 'microsoft',
|
||||
repo: 'playwright',
|
||||
issue_number: response.data.number,
|
||||
labels: ['CQ1'],
|
||||
});
|
||||
53
참고/playwright-main/.github/workflows/roll_nodejs.yml
vendored
Normal file
53
참고/playwright-main/.github/workflows/roll_nodejs.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
name: "PR: bump driver/Docker Node.js"
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# At 10:00am UTC (3AM PST) every tuesday and thursday to roll to new Node.js driver
|
||||
- cron: "0 10 * * 2,4"
|
||||
jobs:
|
||||
trigger-nodejs-roll:
|
||||
name: Trigger Roll
|
||||
runs-on: ubuntu-22.04
|
||||
if: github.repository == 'microsoft/playwright'
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
- run: node utils/build/update-playwright-node.mjs
|
||||
- name: Prepare branch
|
||||
id: prepare-branch
|
||||
run: |
|
||||
if [[ "$(git status --porcelain)" == "" ]]; then
|
||||
echo "there are no changes";
|
||||
exit 0;
|
||||
fi
|
||||
echo "HAS_CHANGES=1" >> $GITHUB_OUTPUT
|
||||
BRANCH_NAME="roll-platform-nodejs/$(date +%Y-%b-%d)"
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_OUTPUT
|
||||
git config --global user.name microsoft-playwright-automation[bot]
|
||||
git config --global user.email 203992400+microsoft-playwright-automation[bot]@users.noreply.github.com
|
||||
git checkout -b "$BRANCH_NAME"
|
||||
git add .
|
||||
git commit -m "chore: roll driver/Dockerfile to recent Node.js LTS version"
|
||||
git push origin $BRANCH_NAME
|
||||
- uses: actions/create-github-app-token@v3
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.PLAYWRIGHT_APP_ID }}
|
||||
private-key: ${{ secrets.PLAYWRIGHT_PRIVATE_KEY }}
|
||||
- name: Create Pull Request
|
||||
if: ${{ steps.prepare-branch.outputs.HAS_CHANGES == '1' }}
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
github-token: ${{ steps.app-token.outputs.token }}
|
||||
script: |
|
||||
await github.rest.pulls.create({
|
||||
owner: 'microsoft',
|
||||
repo: 'playwright',
|
||||
head: 'microsoft:${{ steps.prepare-branch.outputs.BRANCH_NAME }}',
|
||||
base: 'main',
|
||||
title: 'chore: roll driver/Dockerfile to recent Node.js LTS version',
|
||||
});
|
||||
58
참고/playwright-main/.github/workflows/roll_stable_test_runner.yml
vendored
Normal file
58
참고/playwright-main/.github/workflows/roll_stable_test_runner.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: "PR: bump stable-test-runner"
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# At 10:00am UTC (3AM PST) every Monday
|
||||
- cron: "0 10 * * 1"
|
||||
jobs:
|
||||
trigger-roll:
|
||||
name: Trigger Roll
|
||||
runs-on: ubuntu-24.04
|
||||
if: github.repository == 'microsoft/playwright'
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 22
|
||||
- run: |
|
||||
npm install @playwright/test@next
|
||||
VERSION=$(node -e "console.log(require('./package.json').dependencies['@playwright/test'].replace('^', ''))")
|
||||
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
|
||||
working-directory: tests/playwright-test/stable-test-runner/
|
||||
id: bump
|
||||
- name: Prepare branch
|
||||
id: prepare-branch
|
||||
run: |
|
||||
if [[ "$(git status --porcelain)" == "" ]]; then
|
||||
echo "there are no changes";
|
||||
exit 0;
|
||||
fi
|
||||
echo "HAS_CHANGES=1" >> $GITHUB_OUTPUT
|
||||
BRANCH_NAME="roll-stable-test-runner/$(date +%Y-%b-%d)"
|
||||
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_OUTPUT
|
||||
git config --global user.name microsoft-playwright-automation[bot]
|
||||
git config --global user.email 203992400+microsoft-playwright-automation[bot]@users.noreply.github.com
|
||||
git checkout -b "$BRANCH_NAME"
|
||||
git add .
|
||||
git commit -m "test: roll stable-test-runner to ${{ steps.bump.outputs.VERSION }}"
|
||||
git push origin $BRANCH_NAME
|
||||
- uses: actions/create-github-app-token@v3
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.PLAYWRIGHT_APP_ID }}
|
||||
private-key: ${{ secrets.PLAYWRIGHT_PRIVATE_KEY }}
|
||||
- name: Create Pull Request
|
||||
if: ${{ steps.prepare-branch.outputs.HAS_CHANGES == '1' }}
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
github-token: ${{ steps.app-token.outputs.token }}
|
||||
script: |
|
||||
await github.rest.pulls.create({
|
||||
owner: 'microsoft',
|
||||
repo: 'playwright',
|
||||
head: 'microsoft:${{ steps.prepare-branch.outputs.BRANCH_NAME }}',
|
||||
base: 'main',
|
||||
title: 'test: roll stable-test-runner to ${{ steps.bump.outputs.VERSION }}',
|
||||
});
|
||||
94
참고/playwright-main/.github/workflows/tests_bidi.yml
vendored
Normal file
94
참고/playwright-main/.github/workflows/tests_bidi.yml
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
name: tests BiDi
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ref:
|
||||
description: Playwright SHA / ref to test. Use 'refs/pull/PULL_REQUEST_ID/head' to test a PR. Defaults to the current branch.
|
||||
required: false
|
||||
default: ''
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- .github/workflows/tests_bidi.yml
|
||||
- packages/playwright-core/src/server/bidi/**
|
||||
- tests/bidi/**
|
||||
schedule:
|
||||
# Run every day at midnight
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 1
|
||||
|
||||
jobs:
|
||||
test_bidi:
|
||||
name: BiDi
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
id-token: write # This is required for OIDC login (azure/login) to succeed
|
||||
contents: read # This is required for actions/checkout to succeed
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
channel: [bidi-chromium, moz-firefox-nightly]
|
||||
isPullRequest:
|
||||
- ${{ github.event_name == 'pull_request' }}
|
||||
exclude:
|
||||
- isPullRequest: true
|
||||
channel: bidi-chromium
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
if: github.event_name != 'workflow_dispatch'
|
||||
- uses: actions/checkout@v6
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
with:
|
||||
ref: ${{ github.event.inputs.ref }}
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
# Needed for video tests
|
||||
- run: npx playwright install ffmpeg
|
||||
- run: npx playwright install --with-deps chromium
|
||||
- if: matrix.channel == 'moz-firefox-nightly'
|
||||
run: |
|
||||
echo "BIDI_FFPATH=$(npx -y @puppeteer/browsers install firefox@nightly | tail -n1 | sed 's/^[^ ]* *//')" >> "$GITHUB_ENV"
|
||||
- name: Run tests
|
||||
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run biditest -- --retries=${{ matrix.isPullRequest && 2 || 0 }} --project=${{ matrix.channel }}*
|
||||
env:
|
||||
PWTEST_USE_BIDI_EXPECTATIONS: ${{ matrix.isPullRequest && '1' || '' }}
|
||||
- name: Upload csv report to GitHub
|
||||
if: ${{ !cancelled() }}
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: csv-report-${{ matrix.channel }}
|
||||
path: test-results/report.csv
|
||||
retention-days: 7
|
||||
|
||||
- name: Upload json report to GitHub
|
||||
if: ${{ !cancelled() }}
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: json-report-${{ matrix.channel }}
|
||||
path: test-results/report.json
|
||||
retention-days: 7
|
||||
|
||||
- name: Azure Login
|
||||
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
|
||||
uses: azure/login@v3
|
||||
with:
|
||||
client-id: ${{ secrets.AZURE_BLOB_REPORTS_CLIENT_ID }}
|
||||
tenant-id: ${{ secrets.AZURE_BLOB_REPORTS_TENANT_ID }}
|
||||
subscription-id: ${{ secrets.AZURE_BLOB_REPORTS_SUBSCRIPTION_ID }}
|
||||
|
||||
- name: Upload report.csv to Azure
|
||||
if: ${{ !cancelled() && github.ref == 'refs/heads/main' }}
|
||||
run: |
|
||||
REPORT_DIR='bidi-reports'
|
||||
azcopy cp "./test-results/report.csv" "https://mspwblobreport.blob.core.windows.net/\$web/$REPORT_DIR/${{ matrix.channel }}.csv"
|
||||
echo "Report url: https://mspwblobreport.z1.web.core.windows.net/$REPORT_DIR/${{ matrix.channel }}.csv"
|
||||
env:
|
||||
AZCOPY_AUTO_LOGIN_TYPE: AZCLI
|
||||
48
참고/playwright-main/.github/workflows/tests_components.yml
vendored
Normal file
48
참고/playwright-main/.github/workflows/tests_components.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
name: "components"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release-*
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'browser_patches/**'
|
||||
- 'docs/**'
|
||||
- 'packages/extension/**'
|
||||
- 'packages/playwright-core/src/server/bidi/**'
|
||||
- 'packages/playwright-core/src/tools/**'
|
||||
- 'tests/bidi/**'
|
||||
- 'tests/extension/**'
|
||||
- 'tests/mcp/**'
|
||||
branches:
|
||||
- main
|
||||
- release-*
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 1
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
|
||||
jobs:
|
||||
test_components:
|
||||
name: ${{ matrix.os }} - Node.js ${{ matrix.node-version }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
node-version: [20]
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
node-version: 22
|
||||
- os: ubuntu-latest
|
||||
node-version: 24
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- run: npx playwright install --with-deps
|
||||
- run: npm run ct
|
||||
52
참고/playwright-main/.github/workflows/tests_extension.yml
vendored
Normal file
52
참고/playwright-main/.github/workflows/tests_extension.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
name: extension
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release-*
|
||||
paths:
|
||||
- 'packages/playwright-core/src/tools/**'
|
||||
- '!packages/playwright-core/src/tools/dashboard/**'
|
||||
- '!packages/playwright-core/src/tools/trace/**'
|
||||
- 'packages/extension/**'
|
||||
- 'tests/extension/**'
|
||||
- '.github/workflows/tests_extension.yml'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- release-*
|
||||
paths:
|
||||
- 'packages/playwright-core/src/tools/**'
|
||||
- '!packages/playwright-core/src/tools/dashboard/**'
|
||||
- '!packages/playwright-core/src/tools/trace/**'
|
||||
- 'packages/extension/**'
|
||||
- 'tests/extension/**'
|
||||
- '.github/workflows/tests_extension.yml'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 1
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
DEBUG: pw:mcp:error
|
||||
|
||||
jobs:
|
||||
test_extension:
|
||||
name: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 22
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- run: npx playwright install --with-deps chromium
|
||||
- run: npm run test-extension
|
||||
66
참고/playwright-main/.github/workflows/tests_mcp.yml
vendored
Normal file
66
참고/playwright-main/.github/workflows/tests_mcp.yml
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
name: MCP
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release-*
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'browser_patches/**'
|
||||
- 'docs/**'
|
||||
- 'packages/extension/**'
|
||||
- 'packages/playwright-core/src/server/bidi/**'
|
||||
- 'tests/bidi/**'
|
||||
- 'tests/extension/**'
|
||||
branches:
|
||||
- main
|
||||
- release-*
|
||||
|
||||
concurrency:
|
||||
# For pull requests, cancel all currently-running jobs for this workflow
|
||||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
# Force terminal colors. @see https://www.npmjs.com/package/colors
|
||||
FORCE_COLOR: 1
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
DEBUG: pw:mcp:error
|
||||
|
||||
jobs:
|
||||
test_mcp:
|
||||
name: ${{ matrix.os }} - ${{ matrix.project }}
|
||||
# Used for authentication of flakiness upload
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
project: [chrome, chromium, firefox, webkit]
|
||||
include:
|
||||
- os: windows-latest
|
||||
project: chrome
|
||||
- os: windows-latest
|
||||
project: chromium
|
||||
- os: windows-latest
|
||||
project: firefox
|
||||
- os: windows-latest
|
||||
project: webkit
|
||||
- os: windows-latest
|
||||
project: msedge
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
id-token: write # This is required for OIDC login (azure/login) to succeed
|
||||
contents: read # This is required for actions/checkout to succeed
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
node-version: "22"
|
||||
command: npm run test-mcp -- --project=${{ matrix.project }}
|
||||
bot-name: "mcp-${{ matrix.os }}-${{ matrix.project }}"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
138
참고/playwright-main/.github/workflows/tests_others.yml
vendored
Normal file
138
참고/playwright-main/.github/workflows/tests_others.yml
vendored
Normal file
@@ -0,0 +1,138 @@
|
||||
name: tests others
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release-*
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'browser_patches/**'
|
||||
- 'docs/**'
|
||||
- 'packages/playwright-core/src/server/bidi/**'
|
||||
- 'tests/bidi/**'
|
||||
types: [ labeled ]
|
||||
branches:
|
||||
- main
|
||||
- release-*
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 1
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
|
||||
jobs:
|
||||
test_stress:
|
||||
name: Stress - ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- run: npx playwright install --with-deps
|
||||
- run: npm run stest contexts -- --project=chromium
|
||||
if: ${{ !cancelled() }}
|
||||
- run: npm run stest browsers -- --project=chromium
|
||||
if: ${{ !cancelled() }}
|
||||
- run: npm run stest frames -- --project=chromium
|
||||
if: ${{ !cancelled() }}
|
||||
- run: npm run stest contexts -- --project=webkit
|
||||
if: ${{ !cancelled() }}
|
||||
- run: npm run stest browsers -- --project=webkit
|
||||
if: ${{ !cancelled() }}
|
||||
- run: npm run stest frames -- --project=webkit
|
||||
if: ${{ !cancelled() }}
|
||||
- run: npm run stest contexts -- --project=firefox
|
||||
if: ${{ !cancelled() }}
|
||||
- run: npm run stest browsers -- --project=firefox
|
||||
if: ${{ !cancelled() }}
|
||||
- run: npm run stest frames -- --project=firefox
|
||||
if: ${{ !cancelled() }}
|
||||
- run: npm run stest heap -- --project=chromium
|
||||
if: ${{ !cancelled() }}
|
||||
|
||||
test_clock_frozen_time_linux:
|
||||
name: time library - ${{ matrix.clock }}
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
permissions:
|
||||
id-token: write # This is required for OIDC login (azure/login) to succeed
|
||||
contents: read # This is required for actions/checkout to succeed
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
clock: [frozen, realtime]
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
node-version: 20
|
||||
browsers-to-install: chromium
|
||||
command: npm run test -- --project=chromium-*
|
||||
bot-name: "${{ matrix.clock }}-time-library-chromium-linux"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
env:
|
||||
PW_CLOCK: ${{ matrix.clock }}
|
||||
|
||||
test_clock_frozen_time_test_runner:
|
||||
name: time test runner - ${{ matrix.clock }}
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
id-token: write # This is required for OIDC login (azure/login) to succeed
|
||||
contents: read # This is required for actions/checkout to succeed
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
clock: [frozen, realtime]
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
node-version: 20
|
||||
command: npm run ttest
|
||||
bot-name: "${{ matrix.clock }}-time-runner-chromium-linux"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
env:
|
||||
PW_CLOCK: ${{ matrix.clock }}
|
||||
|
||||
test_electron:
|
||||
name: Electron - ${{ matrix.os }}
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
permissions:
|
||||
id-token: write # This is required for OIDC login (azure/login) to succeed
|
||||
contents: read # This is required for actions/checkout to succeed
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Setup Ubuntu Binary Installation # TODO: Remove when https://github.com/electron/electron/issues/42510 is fixed
|
||||
if: ${{ runner.os == 'Linux' }}
|
||||
run: |
|
||||
if grep -q "Ubuntu 24" /etc/os-release; then
|
||||
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
|
||||
fi
|
||||
shell: bash
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
browsers-to-install: chromium
|
||||
command: npm run etest
|
||||
bot-name: "electron-${{ matrix.os }}"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
env:
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD:
|
||||
228
참고/playwright-main/.github/workflows/tests_primary.yml
vendored
Normal file
228
참고/playwright-main/.github/workflows/tests_primary.yml
vendored
Normal file
@@ -0,0 +1,228 @@
|
||||
name: "tests 1"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release-*
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'browser_patches/**'
|
||||
- 'docs/**'
|
||||
- 'packages/extension/**'
|
||||
- 'packages/playwright-core/src/server/bidi/**'
|
||||
- 'packages/playwright-core/src/tools/**'
|
||||
- 'tests/bidi/**'
|
||||
- 'tests/extension/**'
|
||||
- 'tests/mcp/**'
|
||||
branches:
|
||||
- main
|
||||
- release-*
|
||||
|
||||
concurrency:
|
||||
# For pull requests, cancel all currently-running jobs for this workflow
|
||||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
# Force terminal colors. @see https://www.npmjs.com/package/colors
|
||||
FORCE_COLOR: 1
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
|
||||
jobs:
|
||||
test_linux:
|
||||
name: ${{ matrix.os }} (${{ matrix.browser }} - Node.js ${{ matrix.node-version }})
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
browser: [chromium, firefox, webkit]
|
||||
os: [ubuntu-22.04]
|
||||
node-version: [20]
|
||||
include:
|
||||
- os: ubuntu-22.04
|
||||
node-version: 22
|
||||
browser: chromium
|
||||
- os: ubuntu-22.04
|
||||
node-version: 24
|
||||
browser: chromium
|
||||
- os: ubuntu-22.04-arm
|
||||
node-version: 20
|
||||
browser: chromium
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
id-token: write # This is required for OIDC login (azure/login) to succeed
|
||||
contents: read # This is required for actions/checkout to succeed
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
browsers-to-install: ${{ matrix.browser }} chromium
|
||||
command: npm run test -- --project=${{ matrix.browser }}-*
|
||||
bot-name: "${{ matrix.browser }}-${{ matrix.os }}-node${{ matrix.node-version }}"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
|
||||
test_linux_chromium_tot:
|
||||
name: ${{ matrix.os }} (chromium tip-of-tree)
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-22.04]
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
id-token: write # This is required for OIDC login (azure/login) to succeed
|
||||
contents: read # This is required for actions/checkout to succeed
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
browsers-to-install: chromium-tip-of-tree
|
||||
command: npm run test -- --project=chromium-*
|
||||
bot-name: "${{ matrix.os }}-chromium-tip-of-tree"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
env:
|
||||
PWTEST_CHANNEL: chromium-tip-of-tree
|
||||
|
||||
test_test_runner:
|
||||
name: Test Runner
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
node-version: [20]
|
||||
shardIndex: [1, 2]
|
||||
shardTotal: [2]
|
||||
shardWeights: ['58:42']
|
||||
include:
|
||||
- os: windows-latest
|
||||
node-version: 20
|
||||
shardIndex: 1
|
||||
shardTotal: 3
|
||||
shardWeights: '44:33:23'
|
||||
- os: windows-latest
|
||||
node-version: 20
|
||||
shardIndex: 2
|
||||
shardTotal: 3
|
||||
shardWeights: '44:33:23'
|
||||
- os: windows-latest
|
||||
node-version: 20
|
||||
shardIndex: 3
|
||||
shardTotal: 3
|
||||
shardWeights: '44:33:23'
|
||||
- os: ubuntu-latest
|
||||
node-version: 22
|
||||
shardIndex: 1
|
||||
shardTotal: 2
|
||||
shardWeights: '58:42'
|
||||
- os: ubuntu-latest
|
||||
node-version: 22
|
||||
shardIndex: 2
|
||||
shardTotal: 2
|
||||
shardWeights: '58:42'
|
||||
- os: ubuntu-latest
|
||||
node-version: 24
|
||||
shardIndex: 1
|
||||
shardTotal: 2
|
||||
shardWeights: '58:42'
|
||||
- os: ubuntu-latest
|
||||
node-version: 24
|
||||
shardIndex: 2
|
||||
shardTotal: 2
|
||||
shardWeights: '58:42'
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
id-token: write # This is required for OIDC login (azure/login) to succeed
|
||||
contents: read # This is required for actions/checkout to succeed
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
node-version: ${{matrix.node-version}}
|
||||
command: npm run ttest -- --shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
|
||||
bot-name: "${{ matrix.os }}-node${{ matrix.node-version }}"
|
||||
shard-index: ${{ matrix.shardIndex }}
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
env:
|
||||
PWTEST_CHANNEL: firefox-beta
|
||||
PWTEST_SHARD_WEIGHTS: ${{ matrix.shardWeights }}
|
||||
|
||||
test_vscode_extension:
|
||||
name: VSCode Extension
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
- run: npm ci
|
||||
env:
|
||||
DEBUG: pw:install
|
||||
- run: npm run build
|
||||
- run: npx playwright install chromium
|
||||
- name: Checkout extension
|
||||
run: git clone https://github.com/microsoft/playwright-vscode.git
|
||||
- name: Print extension revision
|
||||
run: git rev-parse HEAD
|
||||
working-directory: ./playwright-vscode
|
||||
- name: Remove @playwright/test from extension dependencies
|
||||
run: node -e "const p = require('./package.json'); delete p.devDependencies['@playwright/test']; fs.writeFileSync('./package.json', JSON.stringify(p, null, 2));"
|
||||
working-directory: ./playwright-vscode
|
||||
- name: Build extension
|
||||
run: npm ci && npm run build
|
||||
working-directory: ./playwright-vscode
|
||||
- name: Run extension tests
|
||||
run: npm run test
|
||||
working-directory: ./playwright-vscode
|
||||
env:
|
||||
PW_TAG: "@vscode-extension"
|
||||
- name: Upload blob report
|
||||
if: ${{ !cancelled() && (github.event_name == 'pull_request' || failure()) }}
|
||||
uses: ./.github/actions/upload-blob-report
|
||||
with:
|
||||
report_dir: playwright-vscode/blob-report
|
||||
job_name: vscode-extension
|
||||
|
||||
test_package_installations:
|
||||
name: "Installation Test ${{ matrix.os }}"
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
- windows-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 45
|
||||
permissions:
|
||||
id-token: write # This is required for OIDC login (azure/login) to succeed
|
||||
contents: read # This is required for actions/checkout to succeed
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- run: npm install -g yarn@1
|
||||
- run: npm install -g pnpm@8
|
||||
- name: Setup Ubuntu Binary Installation # TODO: Remove when https://github.com/electron/electron/issues/42510 is fixed
|
||||
if: ${{ runner.os == 'Linux' }}
|
||||
run: |
|
||||
if grep -q "Ubuntu 24" /etc/os-release; then
|
||||
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
|
||||
fi
|
||||
shell: bash
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
command: npm run itest
|
||||
bot-name: "package-installations-${{ matrix.os }}"
|
||||
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }}
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
322
참고/playwright-main/.github/workflows/tests_secondary.yml
vendored
Normal file
322
참고/playwright-main/.github/workflows/tests_secondary.yml
vendored
Normal file
@@ -0,0 +1,322 @@
|
||||
name: "tests 2"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release-*
|
||||
pull_request:
|
||||
types: [ labeled ]
|
||||
branches:
|
||||
- main
|
||||
- release-*
|
||||
|
||||
env:
|
||||
# Force terminal colors. @see https://www.npmjs.com/package/colors
|
||||
FORCE_COLOR: 1
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
|
||||
permissions:
|
||||
id-token: write # This is required for OIDC login (azure/login) to succeed
|
||||
contents: read # This is required for actions/checkout to succeed
|
||||
|
||||
jobs:
|
||||
test_linux:
|
||||
name: ${{ matrix.os }} (${{ matrix.browser }})
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
browser: [chromium, firefox, webkit]
|
||||
os: [ubuntu-24.04]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
browsers-to-install: ${{ matrix.browser }} chromium
|
||||
command: npm run test -- --project=${{ matrix.browser }}-*
|
||||
bot-name: "${{ matrix.browser }}-${{ matrix.os }}"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
|
||||
test_mac:
|
||||
name: ${{ matrix.os }} (${{ matrix.browser }})
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Intel: *-large
|
||||
# Arm64: *-xlarge
|
||||
os: [macos-15-large, macos-15-xlarge, macos-26-large, macos-26-xlarge]
|
||||
browser: [chromium, firefox, webkit]
|
||||
include:
|
||||
- os: macos-14-xlarge
|
||||
browser: chromium
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
browsers-to-install: ${{ matrix.browser }} chromium
|
||||
command: npm run test -- --project=${{ matrix.browser }}-*
|
||||
bot-name: "${{ matrix.browser }}-${{ matrix.os }}"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
|
||||
test_win:
|
||||
name: "Windows"
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
browser: [chromium, firefox, webkit]
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
browsers-to-install: ${{ matrix.browser }} chromium
|
||||
command: npm run test -- --project=${{ matrix.browser }}-* ${{ matrix.browser == 'firefox' && '--workers 1' || '' }}
|
||||
bot-name: "${{ matrix.browser }}-windows-latest"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
|
||||
test-package-installations-other-node-versions:
|
||||
name: "Installation Test ${{ matrix.os }} (${{ matrix.node_version }})"
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
node_version: 20
|
||||
- os: ubuntu-latest
|
||||
node_version: 22
|
||||
- os: ubuntu-latest
|
||||
node_version: 24
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- run: npm install -g yarn@1
|
||||
- run: npm install -g pnpm@8
|
||||
- name: Setup Ubuntu Binary Installation # TODO: Remove when https://github.com/electron/electron/issues/42510 is fixed
|
||||
if: ${{ runner.os == 'Linux' }}
|
||||
run: |
|
||||
if grep -q "Ubuntu 24" /etc/os-release; then
|
||||
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
|
||||
fi
|
||||
shell: bash
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
node-version: ${{ matrix.node_version }}
|
||||
command: npm run itest
|
||||
bot-name: "package-installations-${{ matrix.os }}-node${{ matrix.node_version }}"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
|
||||
headed_tests:
|
||||
name: "headed ${{ matrix.browser }} (${{ matrix.os }})"
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
browser: [chromium, firefox, webkit]
|
||||
os: [ubuntu-24.04, macos-15-xlarge, windows-latest]
|
||||
include:
|
||||
# We have different binaries per Ubuntu version for WebKit.
|
||||
- browser: webkit
|
||||
os: ubuntu-22.04
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
browsers-to-install: ${{ matrix.browser }} chromium
|
||||
command: npm run test -- --project=${{ matrix.browser }}-* --headed --workers=2
|
||||
bot-name: "${{ matrix.browser }}-headed-${{ matrix.os }}"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
|
||||
driver_linux:
|
||||
name: "Driver"
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
browsers-to-install: chromium
|
||||
command: npm run ctest
|
||||
bot-name: "driver"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
env:
|
||||
PWTEST_MODE: driver
|
||||
|
||||
tracing_linux:
|
||||
name: Tracing ${{ matrix.browser }} ${{ matrix.channel }}
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- browser: chromium
|
||||
runs-on: ubuntu-22.04
|
||||
- browser: firefox
|
||||
runs-on: ubuntu-22.04
|
||||
# See https://github.com/microsoft/playwright/issues/35586
|
||||
- browser: webkit
|
||||
runs-on: ubuntu-24.04
|
||||
- browser: chromium
|
||||
runs-on: ubuntu-22.04
|
||||
channel: chromium-tip-of-tree
|
||||
runs-on: ${{ matrix.runs-on }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
browsers-to-install: ${{ matrix.browser }} chromium ${{ matrix.channel }}
|
||||
command: npm run test -- --project=${{ matrix.browser }}-*
|
||||
bot-name: "tracing-${{ matrix.channel || matrix.browser }}"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
env:
|
||||
PWTEST_TRACE: 1
|
||||
PWTEST_CHANNEL: ${{ matrix.channel }}
|
||||
|
||||
test_chromium_channels:
|
||||
name: Test ${{ matrix.channel }} on ${{ matrix.runs-on }}
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
runs-on: ${{ matrix.runs-on }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
channel: [chrome, chrome-beta, msedge, msedge-beta, msedge-dev]
|
||||
runs-on: [ubuntu-22.04, macos-latest, windows-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
browsers-to-install: ${{ matrix.channel }}
|
||||
command: npm run ctest
|
||||
bot-name: ${{ matrix.channel }}-${{ matrix.runs-on }}
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
env:
|
||||
PWTEST_CHANNEL: ${{ matrix.channel }}
|
||||
|
||||
chromium_tot:
|
||||
name: Chromium tip-of-tree ${{ matrix.os }}${{ matrix.headed }}
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Note: we keep older versions here, assuming they are more likely to break with ToT builds.
|
||||
os: [ubuntu-22.04, macos-15, windows-latest]
|
||||
headed: ['--headed', '']
|
||||
exclude:
|
||||
# Tested in tests_primary.yml already
|
||||
- os: ubuntu-22.04
|
||||
headed: ''
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
browsers-to-install: chromium-tip-of-tree
|
||||
command: npm run ctest -- ${{ matrix.headed }}
|
||||
bot-name: "chromium-tip-of-tree-${{ matrix.os }}${{ matrix.headed }}"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
env:
|
||||
PWTEST_CHANNEL: chromium-tip-of-tree
|
||||
|
||||
chromium_tot_headless_shell:
|
||||
name: Chromium tip-of-tree headless-shell-${{ matrix.os }}
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-22.04]
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
browsers-to-install: chromium-tip-of-tree-headless-shell
|
||||
command: npm run ctest
|
||||
bot-name: "chromium-tip-of-tree-headless-shell-${{ matrix.os }}"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
env:
|
||||
PWTEST_CHANNEL: chromium-tip-of-tree-headless-shell
|
||||
|
||||
firefox_beta:
|
||||
name: Firefox Beta ${{ matrix.os }}
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-22.04, windows-latest, macos-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
browsers-to-install: firefox-beta chromium
|
||||
command: npm run ftest
|
||||
bot-name: "firefox-beta-${{ matrix.os }}"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
env:
|
||||
PWTEST_CHANNEL: firefox-beta
|
||||
|
||||
build-playwright-driver:
|
||||
name: "build-playwright-driver"
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- run: utils/build/build-playwright-driver.sh
|
||||
|
||||
test_channel_chromium:
|
||||
name: Test channel=chromium
|
||||
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
runs-on: [ubuntu-latest, windows-latest, macos-latest]
|
||||
runs-on: ${{ matrix.runs-on }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
# TODO: this should pass --no-shell.
|
||||
# However, codegen tests do not inherit the channel and try to launch headless shell.
|
||||
browsers-to-install: chromium
|
||||
command: npm run ctest
|
||||
bot-name: "channel-chromium-${{ matrix.runs-on }}"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
env:
|
||||
PWTEST_CHANNEL: chromium
|
||||
38
참고/playwright-main/.github/workflows/tests_video.yml
vendored
Normal file
38
참고/playwright-main/.github/workflows/tests_video.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: "tests Video"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release-*
|
||||
|
||||
env:
|
||||
# Force terminal colors. @see https://www.npmjs.com/package/colors
|
||||
FORCE_COLOR: 1
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
|
||||
jobs:
|
||||
video_linux:
|
||||
name: "Video Linux"
|
||||
environment: allow-uploading-flakiness-results
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
browser: [chromium, firefox, webkit]
|
||||
os: [ubuntu-22.04, ubuntu-24.04]
|
||||
permissions:
|
||||
id-token: write # This is required for OIDC login (azure/login) to succeed
|
||||
contents: read # This is required for actions/checkout to succeed
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: ./.github/actions/run-test
|
||||
with:
|
||||
browsers-to-install: ${{ matrix.browser }} chromium
|
||||
command: npm run test -- --project=${{ matrix.browser }}-*
|
||||
bot-name: "${{ matrix.browser }}-${{ matrix.os }}"
|
||||
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
|
||||
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
|
||||
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
|
||||
env:
|
||||
PWTEST_VIDEO: 1
|
||||
27
참고/playwright-main/.github/workflows/trigger_tests.yml
vendored
Normal file
27
참고/playwright-main/.github/workflows/trigger_tests.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
name: "Internal Tests"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release-*
|
||||
|
||||
jobs:
|
||||
trigger:
|
||||
name: "trigger"
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/create-github-app-token@v3
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.PLAYWRIGHT_APP_ID }}
|
||||
private-key: ${{ secrets.PLAYWRIGHT_PRIVATE_KEY }}
|
||||
repositories: playwright-browsers
|
||||
- run: |
|
||||
curl -X POST \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
-H "Authorization: token ${GH_TOKEN}" \
|
||||
--data "{\"event_type\": \"playwright_tests\", \"client_payload\": {\"ref\": \"${GITHUB_SHA}\"}}" \
|
||||
https://api.github.com/repos/microsoft/playwright-browsers/dispatches
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
Reference in New Issue
Block a user