Add CI pipeline to run eng/scripts PowerShell unit tests

Offen
#50,190 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
69/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
github-actions, powershell, python
Bereich
ci-cd, testing

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.
Vorherrschende Sprache
Python
Sterne
5.6k
Forks
3.4k
Ø Merge
1 T. 23 Std.
Gemergte PRs (30 T.)
189

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Azure/azure-sdk-for-python

Alle Issues in Azure/azure-sdk-for-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.