Skip to content

Commit ba0d52a

Browse files
authored
fix: always run vis-test jobs so required checks report status (#18392)
## Problem When `AFFECTED_TAGS` computes to `NONE` (e.g. a PR that only touches `shared-ui-components` or other non-vis-test code), the WebGL2 and WebGPU visualization test jobs were **skipped entirely** via job-level conditions: ```yaml condition: and(succeeded(), ne(dependencies.Build.outputs['ComputeVisTags.AFFECTED_TAGS'], 'NONE')) ``` This meant Azure DevOps never reported a status for these jobs. Since they are **required checks**, the PR was blocked from merging — even though there were no relevant tests to run. **Example:** #18389 — WebGL2 job shows as "expected" but never runs: [build logs](https://dev.azure.com/babylonjs/ContinousIntegration/_build/results?buildId=52627&view=logs&jobId=41c91092-7737-59ad-bca4-0f81503fea43&j=e5cc6727-28b8-51a4-d48e-c84cfcad289b) ## Fix - **Remove the job-level `NONE` condition** — both vis-test jobs now always run, so Azure DevOps always reports a status (satisfying the required check). - **Add step-level conditions** on `npm install` and the BrowserStack test step: `condition: ne(variables['AFFECTED_TAGS'], 'NONE')` — skips the expensive work when there are no affected tests. - **Add an echo step** (`"Skip — no affected tests"`) that runs when `NONE` — produces a clear green status in the build log. The job runs, reports green, and the required check is satisfied. No BrowserStack sessions are wasted. ## Changes - `.azure-pipelines/ci-monorepo.yml` — WebGL2 and WebGPU job conditions
1 parent 74284a7 commit ba0d52a

1 file changed

Lines changed: 20 additions & 8 deletions

File tree

.azure-pipelines/ci-monorepo.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -548,10 +548,13 @@ jobs:
548548
- job: VisualizationWebGL2
549549
displayName: "Visualization tests - WebGL 2"
550550
dependsOn: Build
551-
condition: and(succeeded(), ne(dependencies.Build.outputs['ComputeVisTags.AFFECTED_TAGS'], 'NONE'))
552551
variables:
553552
AFFECTED_TAGS: $[ dependencies.Build.outputs['ComputeVisTags.AFFECTED_TAGS'] ]
554553
steps:
554+
- bash: echo "No visualization tests affected by this change — skipping."
555+
displayName: "Skip — no affected tests"
556+
condition: eq(variables['AFFECTED_TAGS'], 'NONE')
557+
555558
- template: templates/checkout-with-tag-override.yml
556559

557560
- task: UseNode@1
@@ -570,13 +573,15 @@ jobs:
570573
#npx playwright install
571574
#npx playwright install --force chrome
572575
displayName: "npm install"
576+
condition: ne(variables['AFFECTED_TAGS'], 'NONE')
573577
retryCountOnTaskFailure: 1
574578
env:
575579
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: "true"
576580
PUPPETEER_SKIP_DOWNLOAD: "true"
577581
578582
- script: npm run test:playwright -w @tools/tests -- --project=webgl2
579583
displayName: "WebGL2 BStack"
584+
condition: ne(variables['AFFECTED_TAGS'], 'NONE')
580585
env:
581586
CDN_BASE_URL: "$(SNAPSHOT_CDN_URL)/$(BuildName)"
582587
CI: "true"
@@ -591,18 +596,19 @@ jobs:
591596
curl "$(DEPLOYMENT_SERVER)/$(DEPLOY_ENDPOINT_DELETE)?path=$(BuildName)/testResults/webgl2playwright" -X POST -H "Authorization: $(BASIC_AUTH)"
592597
displayName: "Delete test results"
593598
continueOnError: true
594-
condition: eq(variables['SNAPSHOTEXISTS'], 'true')
599+
condition: and(eq(variables['SNAPSHOTEXISTS'], 'true'), ne(variables['AFFECTED_TAGS'], 'NONE'))
595600
596601
- template: templates/upload-test-results.yml
597602
parameters:
598603
reportDir: "packages/tools/tests/playwright-report"
599604
fallbackReportDir: "playwright-report"
600605
deployPath: "$(BuildName)/testResults/webgl2playwright"
601606
continueOnError: true
607+
condition: ne(variables['AFFECTED_TAGS'], 'NONE')
602608

603609
- task: GitHubComment@0
604610
displayName: "GitHub WebGL2 comment"
605-
condition: eq(variables['SNAPSHOTEXISTS'], 'false')
611+
condition: and(eq(variables['SNAPSHOTEXISTS'], 'false'), ne(variables['AFFECTED_TAGS'], 'NONE'))
606612
inputs:
607613
gitHubConnection: "$(GITHUB_SERVICE_CONNECTION)"
608614
repositoryName: "$(Build.Repository.Name)"
@@ -613,7 +619,7 @@ jobs:
613619
614620
- task: PublishTestResults@2
615621
displayName: "Publish webgl2 test results"
616-
condition: succeededOrFailed()
622+
condition: and(succeededOrFailed(), ne(variables['AFFECTED_TAGS'], 'NONE'))
617623
inputs:
618624
testResultsFormat: JUnit
619625
testResultsFiles: "./packages/tools/tests/junit.xml"
@@ -626,10 +632,13 @@ jobs:
626632
- job: VisualizationWebGPU
627633
displayName: "Visualization tests - WebGPU"
628634
dependsOn: Build
629-
condition: and(succeeded(), ne(dependencies.Build.outputs['ComputeVisTags.AFFECTED_TAGS'], 'NONE'))
630635
variables:
631636
AFFECTED_TAGS: $[ dependencies.Build.outputs['ComputeVisTags.AFFECTED_TAGS'] ]
632637
steps:
638+
- bash: echo "No visualization tests affected by this change — skipping."
639+
displayName: "Skip — no affected tests"
640+
condition: eq(variables['AFFECTED_TAGS'], 'NONE')
641+
633642
- template: templates/checkout-with-tag-override.yml
634643

635644
- task: UseNode@1
@@ -647,13 +656,15 @@ jobs:
647656
npm install
648657
#npx playwright install --force chrome
649658
displayName: "npm install"
659+
condition: ne(variables['AFFECTED_TAGS'], 'NONE')
650660
retryCountOnTaskFailure: 1
651661
env:
652662
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: "true"
653663
PUPPETEER_SKIP_DOWNLOAD: "true"
654664
655665
- script: npm run test:playwright -w @tools/tests -- --project=webgpu
656666
displayName: "WebGPU BStack"
667+
condition: ne(variables['AFFECTED_TAGS'], 'NONE')
657668
retryCountOnTaskFailure: 1
658669
env:
659670
CDN_BASE_URL: "$(SNAPSHOT_CDN_URL)/$(BuildName)"
@@ -669,19 +680,20 @@ jobs:
669680
curl "$(DEPLOYMENT_SERVER)/$(DEPLOY_ENDPOINT_DELETE)?path=$(BuildName)/testResults/webgpuplaywright" -X POST -H "Authorization: $(BASIC_AUTH)"
670681
displayName: "Delete test results"
671682
continueOnError: true
672-
condition: eq(variables['SNAPSHOTEXISTS'], 'true')
683+
condition: and(eq(variables['SNAPSHOTEXISTS'], 'true'), ne(variables['AFFECTED_TAGS'], 'NONE'))
673684
674685
- template: templates/upload-test-results.yml
675686
parameters:
676687
reportDir: "packages/tools/tests/playwright-report"
677688
fallbackReportDir: "playwright-report"
678689
deployPath: "$(BuildName)/testResults/webgpuplaywright"
679690
continueOnError: true
691+
condition: ne(variables['AFFECTED_TAGS'], 'NONE')
680692

681693
- task: GitHubComment@0
682694
displayName: "Writing GitHub comment"
683695
continueOnError: true
684-
condition: eq(variables['SNAPSHOTEXISTS'], 'false')
696+
condition: and(eq(variables['SNAPSHOTEXISTS'], 'false'), ne(variables['AFFECTED_TAGS'], 'NONE'))
685697
inputs:
686698
gitHubConnection: "$(GITHUB_SERVICE_CONNECTION)"
687699
repositoryName: "$(Build.Repository.Name)"
@@ -692,7 +704,7 @@ jobs:
692704
693705
- task: PublishTestResults@2
694706
displayName: "Publish webgpu test results"
695-
condition: succeededOrFailed()
707+
condition: and(succeededOrFailed(), ne(variables['AFFECTED_TAGS'], 'NONE'))
696708
inputs:
697709
testResultsFormat: JUnit
698710
testResultsFiles: "./packages/tools/tests/junit.xml"

0 commit comments

Comments
 (0)