diff --git a/tools/test-proxy/tests.yml b/tools/test-proxy/tests.yml index 51ac7660056..16e33deeff7 100644 --- a/tools/test-proxy/tests.yml +++ b/tools/test-proxy/tests.yml @@ -4,223 +4,223 @@ variables: - template: /eng/pipelines/templates/variables/globals.yml stages: - # - stage: IntegrationTests - # displayName: "Asset Sync Integration Tests" - # jobs: - # - job: Solution_Integration_Test - - # strategy: - # matrix: - # Windows: - # Pool: 'azsdk-pool-mms-win-2022-general' - # OS: 'Windows' - # Linux: - # Pool: azsdk-pool-mms-ubuntu-2204-general - # OS: 'Linux' - # Mac: - # Pool: 'Azure Pipelines' - # OS: 'Mac' - - # pool: - # name: $(Pool) - - # steps: - # - template: /eng/pipelines/templates/steps/install-dotnet.yml - - # - script: 'dotnet test /p:ArtifactsPackagesDir=$(Build.ArtifactStagingDirectory) --filter "Category=Integration" --logger trx $(Build.SourcesDirectory)/tools/test-proxy/' - # displayName: 'Test' - # env: - # DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 - # DOTNET_CLI_TELEMETRY_OPTOUT: 1 - # DOTNET_MULTILEVEL_LOOKUP: 0 - # GIT_TOKEN: $(azuresdk-github-pat) - # GIT_COMMIT_OWNER: azure-sdk - # GIT_COMMIT_EMAIL: azuresdk@microsoft.com - - # - task: PublishTestResults@2 - # condition: succeededOrFailed() - # inputs: - # testResultsFiles: '**/*.trx' - # testRunTitle: '$(OS) AssetSync tests against .NET' - # testResultsFormat: 'VSTest' - # mergeTestResults: true - - # - job: CLI_Integration_Test - - # strategy: - # matrix: - # Windows: - # Pool: 'azsdk-pool-mms-win-2022-general' - # OS: 'Windows' - # Linux: - # Pool: azsdk-pool-mms-ubuntu-2204-general - # OS: 'Linux' - # Mac: - # Pool: 'Azure Pipelines' - # OS: 'Mac' - - # pool: - # name: $(Pool) - - # steps: - # - template: /eng/pipelines/templates/steps/install-dotnet.yml - - # - template: /eng/pipelines/templates/steps/test-proxy-local-tool.yml - # parameters: - # runProxy: false - # rootFolder: $(Build.SourcesDirectory) - - # - template: /eng/common/pipelines/templates/steps/run-pester-tests.yml - # parameters: - # TargetTags: "Integration" - # TargetDirectory: tools/test-proxy/scripts/test-scripts/ - # EnvVars: - # GIT_TOKEN: $(azuresdk-github-pat) - # GIT_COMMIT_OWNER: azure-sdk - # GIT_COMMIT_EMAIL: azuresdk@microsoft.com - - # - job: Docker_CLI_Integration_Test - - # pool: - # name: azsdk-pool-mms-ubuntu-2204-general - - # variables: - # CLI_TEST_DOCKER_TAG: localproxyinstance - - # steps: - # - template: /eng/pipelines/templates/steps/install-dotnet.yml - - # - pwsh: | - # ./prepare.ps1 - - # docker build -t $(CLI_TEST_DOCKER_TAG) . - # workingDirectory: tools/test-proxy/docker/ - # displayName: "Prepare and Build local docker image" - - # - template: /eng/common/pipelines/templates/steps/run-pester-tests.yml - # parameters: - # TargetTags: "Integration" - # TargetDirectory: tools/test-proxy/scripts/test-scripts/ - # EnvVars: - # GIT_TOKEN: $(azuresdk-github-pat) - # GIT_COMMIT_OWNER: azure-sdk - # GIT_COMMIT_EMAIL: azuresdk@microsoft.com - # CLI_TEST_WITH_DOCKER: true - # CLI_TEST_DOCKER_TAG: $(CLI_TEST_DOCKER_TAG) - # DISABLE_INTEGRATION_BRANCH_CLEANUP: true + - stage: IntegrationTests + displayName: "Asset Sync Integration Tests" + jobs: + - job: Solution_Integration_Test + + strategy: + matrix: + Windows: + Pool: 'azsdk-pool-mms-win-2022-general' + OS: 'Windows' + Linux: + Pool: azsdk-pool-mms-ubuntu-2204-general + OS: 'Linux' + Mac: + Pool: 'Azure Pipelines' + OS: 'Mac' + + pool: + name: $(Pool) + + steps: + - template: /eng/pipelines/templates/steps/install-dotnet.yml + + - script: 'dotnet test /p:ArtifactsPackagesDir=$(Build.ArtifactStagingDirectory) --filter "Category=Integration" --logger trx $(Build.SourcesDirectory)/tools/test-proxy/' + displayName: 'Test' + env: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_MULTILEVEL_LOOKUP: 0 + GIT_TOKEN: $(azuresdk-github-pat) + GIT_COMMIT_OWNER: azure-sdk + GIT_COMMIT_EMAIL: azuresdk@microsoft.com + + - task: PublishTestResults@2 + condition: succeededOrFailed() + inputs: + testResultsFiles: '**/*.trx' + testRunTitle: '$(OS) AssetSync tests against .NET' + testResultsFormat: 'VSTest' + mergeTestResults: true + + - job: CLI_Integration_Test + + strategy: + matrix: + Windows: + Pool: 'azsdk-pool-mms-win-2022-general' + OS: 'Windows' + Linux: + Pool: azsdk-pool-mms-ubuntu-2204-general + OS: 'Linux' + Mac: + Pool: 'Azure Pipelines' + OS: 'Mac' + + pool: + name: $(Pool) + + steps: + - template: /eng/pipelines/templates/steps/install-dotnet.yml + + - template: /eng/pipelines/templates/steps/test-proxy-local-tool.yml + parameters: + runProxy: false + rootFolder: $(Build.SourcesDirectory) + + - template: /eng/common/pipelines/templates/steps/run-pester-tests.yml + parameters: + TargetTags: "Integration" + TargetDirectory: tools/test-proxy/scripts/test-scripts/ + EnvVars: + GIT_TOKEN: $(azuresdk-github-pat) + GIT_COMMIT_OWNER: azure-sdk + GIT_COMMIT_EMAIL: azuresdk@microsoft.com + + - job: Docker_CLI_Integration_Test + + pool: + name: azsdk-pool-mms-ubuntu-2204-general + + variables: + CLI_TEST_DOCKER_TAG: localproxyinstance + + steps: + - template: /eng/pipelines/templates/steps/install-dotnet.yml + + - pwsh: | + ./prepare.ps1 + + docker build -t $(CLI_TEST_DOCKER_TAG) . + workingDirectory: tools/test-proxy/docker/ + displayName: "Prepare and Build local docker image" + + - template: /eng/common/pipelines/templates/steps/run-pester-tests.yml + parameters: + TargetTags: "Integration" + TargetDirectory: tools/test-proxy/scripts/test-scripts/ + EnvVars: + GIT_TOKEN: $(azuresdk-github-pat) + GIT_COMMIT_OWNER: azure-sdk + GIT_COMMIT_EMAIL: azuresdk@microsoft.com + CLI_TEST_WITH_DOCKER: true + CLI_TEST_DOCKER_TAG: $(CLI_TEST_DOCKER_TAG) + DISABLE_INTEGRATION_BRANCH_CLEANUP: true - stage: RepoUnitTests displayName: Repo-Specific Unit Tests dependsOn: [] jobs: - # - job: Test_JS_Utils - - # displayName: Invoke JS Utils CI Tests - - # strategy: - # matrix: - # Windows: - # Pool: 'azsdk-pool-mms-win-2022-general' - # OS: 'Windows' - # Linux: - # Pool: azsdk-pool-mms-ubuntu-2204-general - # OS: 'Linux' - # Mac: - # Pool: 'Azure Pipelines' - # OS: 'Mac' - - # pool: - # name: $(Pool) - - # variables: - # REPO: "Azure/azure-sdk-for-js" - # CLONE_LOCATION: "$(Agent.BuildDirectory)/js_repo" - - # steps: - # - template: /eng/pipelines/templates/steps/install-dotnet.yml - - # - task: NodeTool@0 - # inputs: - # versionSpec: "16.x" - # displayName: "Use Node 16.x" - - # - pwsh: | - # git clone https://github.com/$(REPO) $(CLONE_LOCATION) --depth 1 - # displayName: Clone Repo - - # - template: /eng/pipelines/templates/steps/test-proxy-local-tool.yml - # parameters: - # runProxy: true - # rootFolder: $(CLONE_LOCATION) - - # - pwsh: | - # npm install -g @microsoft/rush@5.48.0 - # rush update - # rush build -t . - # displayName: 'Install Rush, build and install proxy tests project' - # workingDirectory: $(CLONE_LOCATION)/sdk/test-utils/recorder - # env: - # PROXY_MANUAL_START: "true" - - # - pwsh: | - # rushx test:node - # displayName: 'Invoke Tests' - # workingDirectory: $(CLONE_LOCATION)/sdk/test-utils/recorder - # env: - # PROXY_MANUAL_START: "true" - - # - job: Test_Python_Tables - - # displayName: Run Python Tables CI Tests - - # strategy: - # matrix: - # Windows: - # Pool: 'azsdk-pool-mms-win-2022-general' - # OS: 'Windows' - # Linux: - # Pool: azsdk-pool-mms-ubuntu-2204-general - # OS: 'Linux' - # Mac: - # Pool: 'Azure Pipelines' - # OS: 'Mac' - - # pool: - # name: $(Pool) - - # variables: - # REPO: "Azure/azure-sdk-for-python" - # CLONE_LOCATION: "$(Agent.BuildDirectory)/python_repo" - - # steps: - # - template: /eng/pipelines/templates/steps/install-dotnet.yml - - # - template: /eng/pipelines/templates/steps/use-python-version.yml - # parameters: - # versionSpec: '3.9' - - # - pwsh: | - # git clone https://github.com/$(REPO) $(CLONE_LOCATION) --depth 1 - # displayName: Clone Repo - - # - template: /eng/pipelines/templates/steps/test-proxy-local-tool.yml - # parameters: - # runProxy: true - # rootFolder: $(CLONE_LOCATION) - - # - pwsh: | - # python -m pip install -r dev_requirements.txt - # python -m pip install . - # displayName: 'Install requirements and package' - # workingDirectory: $(CLONE_LOCATION)/sdk/tables/azure-data-tables/ - - # - pwsh: | - # pytest . - # displayName: 'Invoke Tests' - # workingDirectory: $(CLONE_LOCATION)/sdk/tables/azure-data-tables/ - # env: - # PROXY_URL: "http://localhost:5000" - # PROXY_MANUAL_START: true + - job: Test_JS_Utils + + displayName: Invoke JS Utils CI Tests + + strategy: + matrix: + Windows: + Pool: 'azsdk-pool-mms-win-2022-general' + OS: 'Windows' + Linux: + Pool: azsdk-pool-mms-ubuntu-2204-general + OS: 'Linux' + Mac: + Pool: 'Azure Pipelines' + OS: 'Mac' + + pool: + name: $(Pool) + + variables: + REPO: "Azure/azure-sdk-for-js" + CLONE_LOCATION: "$(Agent.BuildDirectory)/js_repo" + + steps: + - template: /eng/pipelines/templates/steps/install-dotnet.yml + + - task: NodeTool@0 + inputs: + versionSpec: "16.x" + displayName: "Use Node 16.x" + + - pwsh: | + git clone https://github.com/$(REPO) $(CLONE_LOCATION) --depth 1 + displayName: Clone Repo + + - template: /eng/pipelines/templates/steps/test-proxy-local-tool.yml + parameters: + runProxy: true + rootFolder: $(CLONE_LOCATION) + + - pwsh: | + npm install -g @microsoft/rush@5.48.0 + rush update + rush build -t . + displayName: 'Install Rush, build and install proxy tests project' + workingDirectory: $(CLONE_LOCATION)/sdk/test-utils/recorder + env: + PROXY_MANUAL_START: "true" + + - pwsh: | + rushx test:node + displayName: 'Invoke Tests' + workingDirectory: $(CLONE_LOCATION)/sdk/test-utils/recorder + env: + PROXY_MANUAL_START: "true" + + - job: Test_Python_Tables + + displayName: Run Python Tables CI Tests + + strategy: + matrix: + Windows: + Pool: 'azsdk-pool-mms-win-2022-general' + OS: 'Windows' + Linux: + Pool: azsdk-pool-mms-ubuntu-2204-general + OS: 'Linux' + Mac: + Pool: 'Azure Pipelines' + OS: 'Mac' + + pool: + name: $(Pool) + + variables: + REPO: "Azure/azure-sdk-for-python" + CLONE_LOCATION: "$(Agent.BuildDirectory)/python_repo" + + steps: + - template: /eng/pipelines/templates/steps/install-dotnet.yml + + - template: /eng/pipelines/templates/steps/use-python-version.yml + parameters: + versionSpec: '3.9' + + - pwsh: | + git clone https://github.com/$(REPO) $(CLONE_LOCATION) --depth 1 + displayName: Clone Repo + + - template: /eng/pipelines/templates/steps/test-proxy-local-tool.yml + parameters: + runProxy: true + rootFolder: $(CLONE_LOCATION) + + - pwsh: | + python -m pip install -r dev_requirements.txt + python -m pip install . + displayName: 'Install requirements and package' + workingDirectory: $(CLONE_LOCATION)/sdk/tables/azure-data-tables/ + + - pwsh: | + pytest . + displayName: 'Invoke Tests' + workingDirectory: $(CLONE_LOCATION)/sdk/tables/azure-data-tables/ + env: + PROXY_URL: "http://localhost:5000" + PROXY_MANUAL_START: true - job: Test_Java_Core