Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/create_test_report.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Publish Test Results
on:
workflow_run:
workflows: ["tests 1", "tests 2", "tests others", "MCP"]
workflows: ["tests 1", "tests 2", "test runner", "tests others", "MCP"]
types:
- completed
jobs:
Expand Down
103 changes: 1 addition & 102 deletions .github/workflows/tests_primary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- 'packages/playwright-core/src/server/bidi/**'
- 'packages/playwright-core/src/tools/**'
- 'tests/bidi/**'
- 'packages/playwright/**'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

library tests depend on expect

- 'tests/mcp/**'
branches:
- main
Expand Down Expand Up @@ -88,108 +89,6 @@ jobs:
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 }}
Expand Down
132 changes: 132 additions & 0 deletions .github/workflows/tests_test_runner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: "test runner"

on:
push:
branches:
- main
- release-*
pull_request:
paths-ignore:
- 'browser_patches/**'
- 'docs/**'
- 'packages/playwright-core/src/server/bidi/**'
- 'packages/playwright-core/src/tools/**'
- 'tests/bidi/**'
- '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_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
Loading