fix: use blob fileName as is without adding shard suffix (#28634)

Fixes https://github.com/microsoft/playwright/issues/27284
This commit is contained in:
Yury Semikhatsky 2023-12-13 18:47:13 -08:00 committed by GitHub
parent 9b2585cd4e
commit e31e5b1b7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -131,11 +131,11 @@ jobs:
- run: npx playwright install --with-deps
- run: npm run ttest -- --shard ${{ matrix.shard }}
env:
PWTEST_BOT_NAME: "${{ matrix.os }}-node${{ matrix.node-version }}"
PWTEST_BOT_NAME: "${{ matrix.os }}-node${{ matrix.node-version }}-${{ matrix.shard }}"
if: matrix.os != 'ubuntu-latest'
- run: xvfb-run npm run ttest -- --shard ${{ matrix.shard }}
env:
PWTEST_BOT_NAME: "${{ matrix.os }}-node${{ matrix.node-version }}"
PWTEST_BOT_NAME: "${{ matrix.os }}-node${{ matrix.node-version }}-${{ matrix.shard }}"
if: matrix.os == 'ubuntu-latest'
- run: ./utils/upload_flakiness_dashboard.sh ./test-results/report.json
if: always()

View File

@ -109,12 +109,14 @@ export class BlobReporter extends TeleReporterEmitter {
}
private _computeReportName(config: FullConfig) {
let reportName = this._options.fileName ?? 'report.zip';
if (this._options.fileName)
return this._options.fileName;
let reportName = 'report';
if (config.shard) {
const paddedNumber = `${config.shard.current}`.padStart(`${config.shard.total}`.length, '0');
reportName = `${reportName.slice(0, -4)}-${paddedNumber}.zip`;
reportName = `${reportName}-${paddedNumber}`;
}
return reportName;
return `${reportName}.zip`;
}
override _serializeAttachments(attachments: TestResult['attachments']): JsonAttachment[] {