Skip to content

Conversation

kasunsjc
Copy link
Owner

@kasunsjc kasunsjc commented Jul 9, 2025

This pull request introduces a comprehensive GitHub Actions testing framework for validating the PowerShell K8s Lab setup. It includes detailed workflows for both basic and advanced testing, along with documentation to guide usage and customization. The key changes focus on adding a streamlined CI workflow, improving test coverage, and providing robust reporting.

New GitHub Actions Workflows for PowerShell K8s Lab

  • Documentation for workflows: Added a detailed README.md in .github/workflows/ to explain the purpose, triggers, test types, and usage of the testing workflows. It also includes troubleshooting tips and environment requirements.
  • Basic testing workflow: Introduced test-powershell-lab-simple.yml for validating PowerShell scripts, including syntax checks, basic functionality tests (e.g., help/status commands), file structure validation, and YAML syntax verification. This workflow supports manual, scheduled, and event-based triggers.

Enhanced Test Coverage and Reporting

  • Test suite execution: The workflow runs a comprehensive suite of tests, including script validation, error handling, and demo application YAML validation. It also generates a detailed markdown test report as an artifact.
  • Customizable test configurations: Users can select test types (syntax, basic, full) and modify default test behavior in test-lab.ps1. The workflows are designed to support both CI and local testing environments. [1] [2]

@kasunsjc kasunsjc requested a review from Copilot July 9, 2025 20:14
Copy link
Contributor

@Copilot Copilot AI left a comment

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 comprehensive GitHub Actions-based testing framework for the PowerShell Kubernetes lab, including new test scripts, multi-node setup scripts, and detailed CI workflows with reporting.

  • Introduces test-lab.ps1 for local validation of scripts, commands, and dependencies
  • Adds setup-minikube.ps1 and setup-kind.ps1 to bootstrap multi-node clusters on Windows
  • Creates two GitHub Actions workflows (test-labs.yml and test-labs-enhanced.yml) plus documentation for CI testing and reporting

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test-lab.ps1 New PowerShell test harness with syntax, command, and dependency checks
minikube-lab/setup-minikube.ps1 Multi-node Minikube setup script
kind-lab/setup-kind.ps1 Multi-node Kind setup script
k8s-lab.ps1 Main orchestration script for start/stop/status/deploy commands
.github/workflows/test-labs.yml Initial CI workflow for basic and full testing
.github/workflows/test-labs-enhanced.yml Enhanced CI workflow with matrix builds, preflight checks, and extended reporting
.github/workflows/README.md Added documentation for how to use and customize the workflows
Comments suppressed due to low confidence (5)

.github/workflows/README.md:7

  • The README references test-powershell-lab-simple.yml, but the actual workflow file is named test-labs.yml. Please update the documentation to match the real filename.
### 1. test-powershell-lab-simple.yml

.github/workflows/README.md:31

  • This section mentions test-powershell-lab.yml, but the file provided is test-labs-enhanced.yml. Align the README with the actual workflow filename.
### 2. test-powershell-lab.yml (Disabled)

test-lab.ps1:71

  • The syntax test covers PowerShell scripts but does not validate the demo application's YAML. Consider adding a step (e.g., using yamllint or simple parsing) to ensure demo-app/demo-app.yaml is also syntactically valid.
function Test-ScriptSyntax {

.github/workflows/test-labs.yml:1

  • [nitpick] There is significant duplication between test-labs.yml and test-labs-enhanced.yml. Consider extracting shared steps into a reusable workflow or composite action to reduce duplication and simplify maintenance.
name: 🧪 Test Minikube and Kind Labs (Enhanced)

.github/workflows/test-labs.yml:99

  • Installing Docker Desktop via Chocolatey can add several minutes to CI runs. Since Windows runners already include Docker, consider removing this step or using the preinstalled Docker to speed up the workflow.
        choco install docker-desktop -y

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.

1 participant