@@ -795,13 +795,55 @@ describe("ci workflow guards", () => {
795795
796796 it ( "keeps workflow guards in fast CI-routing checks" , ( ) => {
797797 const workflow = readCiWorkflow ( ) ;
798+ const preflightStep = workflow . jobs . preflight . steps . find (
799+ ( step ) => step . name === "Build CI manifest" ,
800+ ) ;
801+ const taxonomy = parse ( readFileSync ( "taxonomy.yaml" , "utf8" ) ) as {
802+ profiles : Array < { id : string ; categoryIds : string [ ] } > ;
803+ } ;
804+ const smokeProfile = taxonomy . profiles . find ( ( profile ) => profile . id === "smoke-ci" ) ;
805+ if ( ! smokeProfile ) {
806+ throw new Error ( "taxonomy.yaml is missing the smoke-ci profile" ) ;
807+ }
798808 const fastCoreJob = workflow . jobs [ "checks-fast-core" ] ;
799809 const runStep = fastCoreJob . steps . find (
800810 ( step ) => step . name === "Run ${{ matrix.task }} (${{ matrix.runtime }})" ,
801811 ) ;
812+ const uploadStep = fastCoreJob . steps . find (
813+ ( step ) => step . name === "Upload QA smoke profile evidence" ,
814+ ) ;
815+
816+ const ciWorkflowText = readFileSync ( ".github/workflows/ci.yml" , "utf8" ) ;
802817
818+ expect ( preflightStep . run ) . not . toContain ( "qa-smoke-profile" ) ;
819+ expect ( preflightStep . run ) . not . toContain ( "qa_category" ) ;
820+ expect ( smokeProfile . categoryIds ) . toHaveLength ( 30 ) ;
821+ for ( const categoryId of smokeProfile . categoryIds ) {
822+ expect ( ciWorkflowText ) . not . toContain ( `"${ categoryId } "` ) ;
823+ }
824+ expect ( runStep . run ) . toContain ( "bundled-protocol)" ) ;
825+ expect ( runStep . run ) . toContain ( "qa-smoke-ci)" ) ;
803826 expect ( runStep . run ) . toContain ( "contracts-plugins-ci-routing)" ) ;
804827 expect ( runStep . run ) . toContain ( "ci-routing)" ) ;
828+ expect ( ciWorkflowText ) . toContain (
829+ '{ check_name: "QA Smoke CI", runtime: "node", task: "qa-smoke-ci" }' ,
830+ ) ;
831+ expect ( runStep . run ) . toContain ( "--qa-profile smoke-ci" ) ;
832+ expect ( runStep . run ) . toContain ( "--concurrency 8" ) ;
833+ expect ( runStep . run ) . not . toContain ( "--category" ) ;
834+ expect ( runStep . run ) . not . toContain ( "--allow-failures" ) ;
835+ expect ( runStep . run ) . toContain ( "qa_exit_code=0" ) ;
836+ expect ( runStep . run ) . toContain ( 'exit "$qa_exit_code"' ) ;
837+ expect ( runStep . run ) . toContain ( "scripts/build-all.mjs qaRuntime" ) ;
838+ expect ( runStep . run ) . not . toContain ( "OPENAI_API_KEY" ) ;
839+ expect ( runStep . run ) . toMatch (
840+ / b u n d l e d - p r o t o c o l \) \s + p n p m t e s t : b u n d l e d \s + p n p m p r o t o c o l : c h e c k \s + ; ; \s + q a - s m o k e - c i \) / ,
841+ ) ;
842+ expect ( uploadStep . if ) . toBe ( "always() && matrix.task == 'qa-smoke-ci'" ) ;
843+ expect ( uploadStep . with ) . toMatchObject ( {
844+ path : ".artifacts/qa-e2e/smoke-ci-profile/" ,
845+ "if-no-files-found" : "warn" ,
846+ } ) ;
805847 expect ( runStep . run . match ( / t e s t \/ s c r i p t s \/ c i - w o r k f l o w - g u a r d s \. t e s t \. t s / g) ?. length ) . toBe ( 2 ) ;
806848 } ) ;
807849
0 commit comments