Skip to content

Commit eac0b53

Browse files
committed
[DevTools] Persist Playwright test report as CI artifact
1 parent 199aeb0 commit eac0b53

File tree

4 files changed

+24
-9
lines changed

4 files changed

+24
-9
lines changed

.github/workflows/devtools_regression_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,5 +201,5 @@ jobs:
201201
- uses: actions/upload-artifact@v4
202202
with:
203203
name: screenshots
204-
path: ./tmp/screenshots
204+
path: ./tmp/playwright-artifacts
205205
if-no-files-found: warn

.github/workflows/runtime_build_and_test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,12 @@ jobs:
831831
- run: ./scripts/ci/run_devtools_e2e_tests.js
832832
env:
833833
RELEASE_CHANNEL: experimental
834+
- name: Archive Playwright report
835+
uses: actions/upload-artifact@v4
836+
with:
837+
name: devtools-playwright-artifacts
838+
path: tmp/playwright-artifacts
839+
if-no-files-found: warn
834840

835841
# ----- SIZEBOT -----
836842
sizebot:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ chrome-user-data
2323
.vscode
2424
*.swp
2525
*.swo
26+
/tmp
2627

2728
packages/react-devtools-core/dist
2829
packages/react-devtools-extensions/chrome/build

scripts/ci/run_devtools_e2e_tests.js

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const ROOT_PATH = join(__dirname, '..', '..');
99
const reactVersion = process.argv[2];
1010
const inlinePackagePath = join(ROOT_PATH, 'packages', 'react-devtools-inline');
1111
const shellPackagePath = join(ROOT_PATH, 'packages', 'react-devtools-shell');
12-
const screenshotPath = join(ROOT_PATH, 'tmp', 'screenshots');
12+
const playwrightArtifactsPath = join(ROOT_PATH, 'tmp', 'playwright-artifacts');
1313

1414
const {SUCCESSFUL_COMPILATION_MESSAGE} = require(
1515
join(shellPackagePath, 'constants.js')
@@ -125,14 +125,22 @@ function runTestShell() {
125125
async function runEndToEndTests() {
126126
logBright('Running e2e tests');
127127
if (!reactVersion) {
128-
testProcess = spawn('yarn', ['test:e2e', `--output=${screenshotPath}`], {
129-
cwd: inlinePackagePath,
130-
});
128+
testProcess = spawn(
129+
'yarn',
130+
['test:e2e', `--output=${playwrightArtifactsPath}`],
131+
{
132+
cwd: inlinePackagePath,
133+
}
134+
);
131135
} else {
132-
testProcess = spawn('yarn', ['test:e2e', `--output=${screenshotPath}`], {
133-
cwd: inlinePackagePath,
134-
env: {...process.env, REACT_VERSION: reactVersion},
135-
});
136+
testProcess = spawn(
137+
'yarn',
138+
['test:e2e', `--output=${playwrightArtifactsPath}`],
139+
{
140+
cwd: inlinePackagePath,
141+
env: {...process.env, REACT_VERSION: reactVersion},
142+
}
143+
);
136144
}
137145

138146
testProcess.stdout.on('data', data => {

0 commit comments

Comments
 (0)