Skip to content

feat(tests): add PSScriptAnalyzer and Pester Framework - #45

Closed
ChrisBlankDe wants to merge 6 commits into
mainfrom
addtests
Closed

ChrisBlankDe wants to merge 6 commits into
mainfrom
addtests

Conversation

@ChrisBlankDe

@ChrisBlankDe ChrisBlankDe commented Apr 15, 2026 •

Copy link
Copy Markdown
Contributor

This pull request introduces a comprehensive Continuous Integration (CI) workflow for the repository, adds automated code quality validation, and expands the test suite for PowerShell scripts. The main focus is on automating test execution, enforcing code quality standards, and improving reliability through additional Pester and ScriptAnalyzer tests.

Continuous Integration and Code Quality Automation:

  • Added a new .github/workflows/ci.yml file that defines a multi-stage GitHub Actions workflow for CI. This workflow runs Pester tests, collects code coverage, publishes test and coverage reports, and validates PowerShell and YAML files for syntax and readability. It also summarizes the CI results and fails the build if any validation or tests fail.

Test Suite Enhancements:

  • Added Tests/PSScriptAnalyzer.Tests.ps1 to automatically run PowerShell ScriptAnalyzer rules against all scripts in the Scripts directory, ensuring adherence to best practices and coding standards. Some rules are temporarily disabled with TODOs for future review.
  • Added Tests/RunAlPipelineOverrides.Tests.ps1 to verify that all override scripts in Scripts/Overrides/RunAlPipeline contain valid, non-empty script blocks and that the directory contains at least one override file.

AB#4781

@ChrisBlankDe ChrisBlankDe changed the title feat(tests): add PSScriptAnalyzer and RunAlPipeline overrides tests feat(tests): add PSScriptAnalyzer and Pester Framework Apr 15, 2026
@ChrisBlankDe ChrisBlankDe reopened this Apr 15, 2026
@ChrisBlankDe
ChrisBlankDe marked this pull request as ready for review April 15, 2026 09:12
@ChrisBlankDe
ChrisBlankDe requested a review from a team as a code owner April 15, 2026 09:12
Copilot AI review requested due to automatic review settings April 15, 2026 09:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a GitHub Actions CI pipeline and new Pester-based tests to enforce PowerShell code quality (via PSScriptAnalyzer) and validate override scripts under Scripts/Overrides/RunAlPipeline.

Changes:

  • Introduces a GitHub Actions workflow to run Pester tests, publish test results, and report coverage.
  • Adds a Pester suite to run PSScriptAnalyzer rules across scripts in Scripts/.
  • Adds a Pester suite to verify override scripts in Scripts/Overrides/RunAlPipeline are present and load as non-empty script blocks.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
.github/workflows/ci.yml New CI workflow to run tests, publish results/coverage, and perform basic script/YAML validation.
Tests/PSScriptAnalyzer.Tests.ps1 Pester tests invoking PSScriptAnalyzer rules across repository PowerShell sources.
Tests/RunAlPipelineOverrides.Tests.ps1 Pester tests validating presence and loadability of RunAlPipeline override scripts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Tests/PSScriptAnalyzer.Tests.ps1 Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread Tests/PSScriptAnalyzer.Tests.ps1 Resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@OleWunschmann

Copy link
Copy Markdown
Contributor

@ChrisBlankDe Some of this is already part of the new alpaca-al-go repo. Maybe we should keep this repo clean and go over my implementation in the new repo?

@ChrisBlankDe ChrisBlankDe reopened this Apr 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Branch Rate Complexity Health
Actions/CreateContainers 0% 0% 0 ❌
Actions/DetermineConfigsToSync 0% 0% 0 ❌
Actions/Initialization 0% 0% 0 ❌
Actions/RemoveContainers 0% 0% 0 ❌
Actions/SyncConfigs 0% 0% 0 ❌
Actions/UpdateSystemFiles 0% 0% 0 ❌
Scripts/Modules 0% 0% 0 ❌
Scripts/Overrides/RunAlPipeline 0% 0% 0 ❌
Summary 0% (0 / 1153) 100% (0 / 0) 0 ❌

@ChrisBlankDe
ChrisBlankDe deleted the addtests branch June 22, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants