From 82b119785bff5a0c68b029522e41970e8f049697 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 29 Jan 2025 15:23:35 -0800 Subject: [PATCH] Sync eng/common directory with azure-sdk-tools for PR 9732 (#6383) * update emitter template * hide step if public pr * update conditions after testing --------- Co-authored-by: m-nash <64171366+m-nash@users.noreply.github.com> --- .../templates/archetype-typespec-emitter.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/eng/common/pipelines/templates/archetype-typespec-emitter.yml b/eng/common/pipelines/templates/archetype-typespec-emitter.yml index fd725b3bc..85a292b8c 100644 --- a/eng/common/pipelines/templates/archetype-typespec-emitter.yml +++ b/eng/common/pipelines/templates/archetype-typespec-emitter.yml @@ -447,3 +447,14 @@ extends: parameters: artifactName: test_artifacts_$(System.JobName) artifactPath: $(Build.ArtifactStagingDirectory) + + - ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}: + - task: AzureCLI@2 + displayName: "Upload Spector Standard Coverage Report" + condition: and(ne(variables['SpectorName'], ''), succeeded()) + inputs: + azureSubscription: "TypeSpec Storage" + scriptType: "bash" + scriptLocation: "inlineScript" + inlineScript: npx tsp-spector upload-coverage --coverageFile $(Build.ArtifactStagingDirectory)/tsp-spector-coverage-azure.json --generatorName @azure-typespec/$(SpectorName) --storageAccountName typespec --containerName coverages --generatorVersion $(node -p -e "require('./package.json').version") --generatorMode azure + workingDirectory: $(Build.SourcesDirectory)/eng/packages/$(SpectorName)