@@ -25,19 +25,21 @@ public async Task MetricsWorkflowsConnectTrustedRunsAndImmutableJson()
2525 {
2626 var root = FindRepositoryRoot ( ) ;
2727 var pages = await File . ReadAllTextAsync ( Path . Combine ( root , ".github/workflows/pages.yml" ) ) ;
28+ var verify = await File . ReadAllTextAsync ( Path . Combine ( root , ".github/workflows/verify.yml" ) ) ;
29+ var performance = await File . ReadAllTextAsync ( Path . Combine ( root , ".github/workflows/performance.yml" ) ) ;
30+ var verifyName = verify . Split ( '\n ' ) . First ( line => line . StartsWith ( "name:" , StringComparison . Ordinal ) ) [ 5 ..] . Trim ( ) ;
31+ var performanceName = performance . Split ( '\n ' ) . First ( line => line . StartsWith ( "name:" , StringComparison . Ordinal ) ) [ 5 ..] . Trim ( ) ;
2832 await Assert . That ( pages ) . Contains ( "workflow_run:" ) ;
29- await Assert . That ( pages ) . Contains ( "workflows: [verify, performance ]" ) ;
33+ await Assert . That ( pages ) . Contains ( $ "workflows: [{ verifyName } , { performanceName } ]") ;
3034 await Assert . That ( pages ) . Contains ( "github.event.workflow_run.head_branch == 'main'" ) ;
3135 await Assert . That ( pages ) . Contains ( "github.event.workflow_run.event == 'push'" ) ;
3236 await Assert . That ( pages ) . Contains ( "actions: read" ) ;
3337 await Assert . That ( pages ) . Contains ( "collect-site-results.sh" ) ;
3438 await Assert . That ( pages ) . Contains ( "site-data" ) ;
35- var verify = await File . ReadAllTextAsync ( Path . Combine ( root , ".github/workflows/verify.yml" ) ) ;
3639 await Assert . That ( verify ) . Contains ( "--report-trx" ) ;
3740 await Assert . That ( verify ) . Contains ( "--minimum-expected-tests 1" ) ;
3841 await Assert . That ( verify ) . Contains ( "test-report" ) ;
3942 await Assert . That ( verify ) . Contains ( "test-results-${{ matrix.runtime_identifier }}" ) ;
40- var performance = await File . ReadAllTextAsync ( Path . Combine ( root , ".github/workflows/performance.yml" ) ) ;
4143 await Assert . That ( performance ) . Contains ( "--json \" ${RUNNER_TEMP}/performance-results.json\" " ) ;
4244 var collector = await File . ReadAllTextAsync ( Path . Combine ( root , ".github/scripts/collect-site-results.sh" ) ) ;
4345 await Assert . That ( collector ) . Contains ( "run_attempt" ) ;
0 commit comments