diff --git a/.github/workflows/weekly-flaky-tests.yml b/.github/workflows/weekly-flaky-tests.yml index bb0e5b3866c9..23d0f340b174 100644 --- a/.github/workflows/weekly-flaky-tests.yml +++ b/.github/workflows/weekly-flaky-tests.yml @@ -33,3 +33,9 @@ jobs: `${process.env.GITHUB_WORKSPACE}/scripts/weekly-flaky-tests.mjs` ); await run({ github, context, core }); + - name: Upload the report + uses: actions/upload-artifact@v7 + with: + name: flaky-tests-report + path: flaky-tests-report/ + retention-days: 15 diff --git a/scripts/weekly-flaky-tests.mjs b/scripts/weekly-flaky-tests.mjs index f3ab63d8016a..db00689db3ca 100644 --- a/scripts/weekly-flaky-tests.mjs +++ b/scripts/weekly-flaky-tests.mjs @@ -1,5 +1,8 @@ +import { mkdir, writeFile } from 'node:fs/promises'; + const LOOKBACK_DAYS = 7; const CONCURRENT_RUNS = 4; +const REPORT_DIR = 'flaky-tests-report'; function normalizeJobName(name) { return name @@ -183,6 +186,9 @@ export default async function run({ github, context, core }) { for (const warning of report.warnings) { core.warning(warning); } - await core.summary.addRaw(renderReport(report, context)).write(); + const markdown = renderReport(report, context); + await core.summary.addRaw(markdown).write(); + await mkdir(REPORT_DIR, { recursive: true }); + await writeFile(`${REPORT_DIR}/report.md`, markdown); return report; }