Skip to content

Commit d5eb410

Browse files
committed
devops: split test runner tests and core tests into seperate workflows
1 parent d7d8e5b commit d5eb410

File tree

3 files changed

+134
-103
lines changed

3 files changed

+134
-103
lines changed

.github/workflows/create_test_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Publish Test Results
22
on:
33
workflow_run:
4-
workflows: ["tests 1", "tests 2", "tests others", "MCP"]
4+
workflows: ["tests 1", "tests 2", "test runner", "tests others", "MCP"]
55
types:
66
- completed
77
jobs:

.github/workflows/tests_primary.yml

Lines changed: 1 addition & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
- 'packages/playwright-core/src/server/bidi/**'
1313
- 'packages/playwright-core/src/tools/**'
1414
- 'tests/bidi/**'
15+
- 'packages/playwright/**'
1516
- 'tests/mcp/**'
1617
branches:
1718
- main
@@ -88,108 +89,6 @@ jobs:
8889
env:
8990
PWTEST_CHANNEL: chromium-tip-of-tree
9091

91-
test_test_runner:
92-
name: Test Runner
93-
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
94-
strategy:
95-
fail-fast: false
96-
matrix:
97-
os: [ubuntu-latest, macos-latest]
98-
node-version: [20]
99-
shardIndex: [1, 2]
100-
shardTotal: [2]
101-
shardWeights: ['58:42']
102-
include:
103-
- os: windows-latest
104-
node-version: 20
105-
shardIndex: 1
106-
shardTotal: 3
107-
shardWeights: '44:33:23'
108-
- os: windows-latest
109-
node-version: 20
110-
shardIndex: 2
111-
shardTotal: 3
112-
shardWeights: '44:33:23'
113-
- os: windows-latest
114-
node-version: 20
115-
shardIndex: 3
116-
shardTotal: 3
117-
shardWeights: '44:33:23'
118-
- os: ubuntu-latest
119-
node-version: 22
120-
shardIndex: 1
121-
shardTotal: 2
122-
shardWeights: '58:42'
123-
- os: ubuntu-latest
124-
node-version: 22
125-
shardIndex: 2
126-
shardTotal: 2
127-
shardWeights: '58:42'
128-
- os: ubuntu-latest
129-
node-version: 24
130-
shardIndex: 1
131-
shardTotal: 2
132-
shardWeights: '58:42'
133-
- os: ubuntu-latest
134-
node-version: 24
135-
shardIndex: 2
136-
shardTotal: 2
137-
shardWeights: '58:42'
138-
runs-on: ${{ matrix.os }}
139-
permissions:
140-
id-token: write # This is required for OIDC login (azure/login) to succeed
141-
contents: read # This is required for actions/checkout to succeed
142-
steps:
143-
- uses: actions/checkout@v6
144-
- uses: ./.github/actions/run-test
145-
with:
146-
node-version: ${{matrix.node-version}}
147-
command: npm run ttest -- --shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
148-
bot-name: "${{ matrix.os }}-node${{ matrix.node-version }}"
149-
shard-index: ${{ matrix.shardIndex }}
150-
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
151-
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
152-
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
153-
env:
154-
PWTEST_CHANNEL: firefox-beta
155-
PWTEST_SHARD_WEIGHTS: ${{ matrix.shardWeights }}
156-
157-
test_vscode_extension:
158-
name: VSCode Extension
159-
runs-on: ubuntu-latest
160-
steps:
161-
- uses: actions/checkout@v6
162-
- uses: actions/setup-node@v6
163-
with:
164-
node-version: 20
165-
- run: npm ci
166-
env:
167-
DEBUG: pw:install
168-
- run: npm run build
169-
- run: npx playwright install chromium
170-
- name: Checkout extension
171-
run: git clone https://github.com/microsoft/playwright-vscode.git
172-
- name: Print extension revision
173-
run: git rev-parse HEAD
174-
working-directory: ./playwright-vscode
175-
- name: Remove @playwright/test from extension dependencies
176-
run: node -e "const p = require('./package.json'); delete p.devDependencies['@playwright/test']; fs.writeFileSync('./package.json', JSON.stringify(p, null, 2));"
177-
working-directory: ./playwright-vscode
178-
- name: Build extension
179-
run: npm ci && npm run build
180-
working-directory: ./playwright-vscode
181-
- name: Run extension tests
182-
run: npm run test
183-
working-directory: ./playwright-vscode
184-
env:
185-
PW_TAG: "@vscode-extension"
186-
- name: Upload blob report
187-
if: ${{ !cancelled() && (github.event_name == 'pull_request' || failure()) }}
188-
uses: ./.github/actions/upload-blob-report
189-
with:
190-
report_dir: playwright-vscode/blob-report
191-
job_name: vscode-extension
192-
19392
test_package_installations:
19493
name: "Installation Test ${{ matrix.os }}"
19594
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
name: "test runner"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release-*
8+
pull_request:
9+
paths-ignore:
10+
- 'browser_patches/**'
11+
- 'docs/**'
12+
- 'packages/playwright-core/src/server/bidi/**'
13+
- 'packages/playwright-core/src/tools/**'
14+
- 'tests/bidi/**'
15+
- 'tests/mcp/**'
16+
branches:
17+
- main
18+
- release-*
19+
20+
concurrency:
21+
# For pull requests, cancel all currently-running jobs for this workflow
22+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
23+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
24+
cancel-in-progress: true
25+
26+
env:
27+
# Force terminal colors. @see https://www.npmjs.com/package/colors
28+
FORCE_COLOR: 1
29+
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
30+
31+
jobs:
32+
test_test_runner:
33+
name: Test Runner
34+
environment: ${{ github.event_name == 'push' && 'allow-uploading-flakiness-results' || null }}
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
os: [ubuntu-latest, macos-latest]
39+
node-version: [20]
40+
shardIndex: [1, 2]
41+
shardTotal: [2]
42+
shardWeights: ['58:42']
43+
include:
44+
- os: windows-latest
45+
node-version: 20
46+
shardIndex: 1
47+
shardTotal: 3
48+
shardWeights: '44:33:23'
49+
- os: windows-latest
50+
node-version: 20
51+
shardIndex: 2
52+
shardTotal: 3
53+
shardWeights: '44:33:23'
54+
- os: windows-latest
55+
node-version: 20
56+
shardIndex: 3
57+
shardTotal: 3
58+
shardWeights: '44:33:23'
59+
- os: ubuntu-latest
60+
node-version: 22
61+
shardIndex: 1
62+
shardTotal: 2
63+
shardWeights: '58:42'
64+
- os: ubuntu-latest
65+
node-version: 22
66+
shardIndex: 2
67+
shardTotal: 2
68+
shardWeights: '58:42'
69+
- os: ubuntu-latest
70+
node-version: 24
71+
shardIndex: 1
72+
shardTotal: 2
73+
shardWeights: '58:42'
74+
- os: ubuntu-latest
75+
node-version: 24
76+
shardIndex: 2
77+
shardTotal: 2
78+
shardWeights: '58:42'
79+
runs-on: ${{ matrix.os }}
80+
permissions:
81+
id-token: write # This is required for OIDC login (azure/login) to succeed
82+
contents: read # This is required for actions/checkout to succeed
83+
steps:
84+
- uses: actions/checkout@v6
85+
- uses: ./.github/actions/run-test
86+
with:
87+
node-version: ${{matrix.node-version}}
88+
command: npm run ttest -- --shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
89+
bot-name: "${{ matrix.os }}-node${{ matrix.node-version }}"
90+
shard-index: ${{ matrix.shardIndex }}
91+
flakiness-client-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_CLIENT_ID }}
92+
flakiness-tenant-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_TENANT_ID }}
93+
flakiness-subscription-id: ${{ secrets.AZURE_FLAKINESS_DASHBOARD_SUBSCRIPTION_ID }}
94+
env:
95+
PWTEST_CHANNEL: firefox-beta
96+
PWTEST_SHARD_WEIGHTS: ${{ matrix.shardWeights }}
97+
98+
test_vscode_extension:
99+
name: VSCode Extension
100+
runs-on: ubuntu-latest
101+
steps:
102+
- uses: actions/checkout@v6
103+
- uses: actions/setup-node@v6
104+
with:
105+
node-version: 20
106+
- run: npm ci
107+
env:
108+
DEBUG: pw:install
109+
- run: npm run build
110+
- run: npx playwright install chromium
111+
- name: Checkout extension
112+
run: git clone https://github.com/microsoft/playwright-vscode.git
113+
- name: Print extension revision
114+
run: git rev-parse HEAD
115+
working-directory: ./playwright-vscode
116+
- name: Remove @playwright/test from extension dependencies
117+
run: node -e "const p = require('./package.json'); delete p.devDependencies['@playwright/test']; fs.writeFileSync('./package.json', JSON.stringify(p, null, 2));"
118+
working-directory: ./playwright-vscode
119+
- name: Build extension
120+
run: npm ci && npm run build
121+
working-directory: ./playwright-vscode
122+
- name: Run extension tests
123+
run: npm run test
124+
working-directory: ./playwright-vscode
125+
env:
126+
PW_TAG: "@vscode-extension"
127+
- name: Upload blob report
128+
if: ${{ !cancelled() && (github.event_name == 'pull_request' || failure()) }}
129+
uses: ./.github/actions/upload-blob-report
130+
with:
131+
report_dir: playwright-vscode/blob-report
132+
job_name: vscode-extension

0 commit comments

Comments
 (0)