Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore: use shared test run id (#24448)

Pavel Feldman216d08ba94db
diff --git a/.github/workflows/tests_service.yml b/.github/workflows/tests_service.yml
index 73bdf2bc76..2b473863ee 100644
--- a/.github/workflows/tests_service.yml
+++ b/.github/workflows/tests_service.yml
@@ -30,6 +30,7 @@ jobs:
PLAYWRIGHT_SERVICE_ACCESS_KEY: ${{ secrets.PLAYWRIGHT_SERVICE_ACCESS_KEY }}
PLAYWRIGHT_SERVICE_URL: ${{ secrets.PLAYWRIGHT_SERVICE_URL }}
PLAYWRIGHT_SERVICE_OS: ${{ matrix.service-os }}
+ PLAYWRIGHT_SERVICE_RUN_ID: ${{ github.run_id }}-${{ github.run_attempt }}-${{ github.sha }}
- name: Upload blob report to GitHub
if: always()
uses: actions/upload-artifact@v3
diff --git a/tests/library/playwright.config.ts b/tests/library/playwright.config.ts
index 1d419115cf..64fb01ccc0 100644
--- a/tests/library/playwright.config.ts
+++ b/tests/library/playwright.config.ts
@@ -54,7 +54,7 @@ const reporters = () => {
};
const os: 'linux' | 'windows' = (process.env.PLAYWRIGHT_SERVICE_OS as 'linux' | 'windows') || 'linux';
-const runId = new Date().toISOString(); // name the test run
+const runId = process.env.PLAYWRIGHT_SERVICE_RUN_ID || new Date().toISOString(); // name the test run
let connectOptions: any;
if (mode === 'service')