( args: BaseReportArgs, )
| 338 | } |
| 339 | |
| 340 | export async function loadCachedBaseReport( |
| 341 | args: BaseReportArgs, |
| 342 | ): Promise<ReportData<'previous'> | null> { |
| 343 | const { |
| 344 | project, |
| 345 | env: { settings }, |
| 346 | } = args; |
| 347 | |
| 348 | const cachedBaseReport = |
| 349 | (await loadCachedBaseReportFromPortal(args)) ?? |
| 350 | (await loadCachedBaseReportFromArtifacts(args)); |
| 351 | |
| 352 | if (!cachedBaseReport) { |
| 353 | return null; |
| 354 | } |
| 355 | return saveReportFiles({ |
| 356 | project, |
| 357 | type: 'previous', |
| 358 | files: { json: cachedBaseReport }, |
| 359 | settings, |
| 360 | }); |
| 361 | } |
| 362 | |
| 363 | async function loadCachedBaseReportFromArtifacts( |
| 364 | args: BaseReportArgs, |
no test coverage detected