Add CI pipeline to run eng/scripts PowerShell unit tests

Aberta
#50,190 0 comentários 1 reação 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
69/100
Tipo de issue
Funcionalidade
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
github-actions, powershell, python
Domínio
ci-cd, testing

Direção de pesquisa

Read the existing Pester tests under eng/scripts/tests/ and compare the .NET and Java eng/scripts/ci.yml examples linked in the issue. Then check the shared eng/common/pipelines/templates/stages/archetype-sdk-tool-pwsh.yml template and the repository's pipeline registration process. Done when offline-safe tests are tagged UnitTest, the new pipeline runs them for the specified branches and platforms, and it is registered for eng/scripts changes.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

EngSys

Copilot agent :copilot: (on behalf of @jeremymeng):

Summary

Consider adding a CI pipeline (eng/scripts/ci.yml) that runs the Pester tests under eng/scripts/ using the shared eng/common/pipelines/templates/stages/archetype-sdk-tool-pwsh.yml template, similar to what .NET and Java already do.

Prior art

Both trigger on changes to eng/scripts/* (plus related pipeline files) for CI and PRs on main, feature/*, release/*, hotfix/*, and run on Windows and Linux.

Current state in this repo

There is no eng/scripts/ci.yml, but Pester tests already exist and are not run in CI:

  • eng/scripts/tests/Package-Namespaces.tests.ps1
  • eng/scripts/tests/Release-CompletionCorrelation.tests.ps1

These tests currently have no UnitTest tag. Since the template filters by TargetTags, they need to be tagged as part of this work.

Suggested work

  1. Tag the offline-safe tests with -Tag UnitTest. Leave live/network-dependent tests untagged or give them a separate tag.
  2. Add eng/scripts/ci.yml that extends /eng/common/pipelines/templates/stages/archetype-sdk-tool-pwsh.yml with TargetDirectory: eng/scripts/ and TargetTags: 'UnitTest'. Add any PreTestSteps needed, such as a shallow checkout or installing required PowerShell modules or toolchains.
  3. Register the pipeline in Azure DevOps so it runs on PRs that touch eng/scripts.
Linguagem predominante
Python
Estrelas
5.6k
Forks
3.4k
Merge médio
1d 23h
PRs com merge (30d)
189

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de Azure/azure-sdk-for-python

Todas as issues de Azure/azure-sdk-for-python

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.