Add CI pipeline to run eng/scripts PowerShell unit tests

Đang mở
#50,190 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
69/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, powershell, python
Lĩnh vực
ci-cd, testing

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
Python
Star
5.6k
Fork
3.4k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
189

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/azure-sdk-for-python

Tất cả issue của Azure/azure-sdk-for-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.