v4.1.0
🚀[Feature]: Test Setup & Teardown Support for GitHub Actions Workflows (#191)
Overview
This release introduces automated test environment management through BeforeAll.ps1 and AfterAll.ps1 scripts, enabling comprehensive setup and teardown capabilities for module tests running in GitHub Actions. This enhancement solves the challenge of managing complex test environments (databases, infrastructure, external services) across parallel test matrices while ensuring proper cleanup regardless of test outcomes.
🎯 Main Feature: Test Lifecycle Management
The Problem
Previously, setting up test infrastructure required:
- Rate-limiting issue when creating GitHub Repositories for the GitHub PowerShell module, where the setup and teardown happens in the individual test files via BeforeAll and AfterAll blocks.
The Solution
Dedicated setup and teardown jobs with automatic script execution:
- BeforeAll: Runs once before all test matrix jobs begin.
- AfterAll: Runs once after all test matrix jobs complete.
Configuration
No configuration needed! Simply add scripts to your test directory.
The workflow automatically detects and executes these scripts when present.
your-module/
├── tests/
│ ├── BeforeAll.ps1 ← Setup script (optional)
│ ├── AfterAll.ps1 ← Teardown script (optional)
│ └── Module.Tests.ps1 ← The tests that require external setup
│
Additional: Specification-Driven Development Framework
This release also includes an implementation of spec-kit principles, adding a structured workflow for feature development from specification through implementation.
What's Included
- Prompt templates (
.github/prompts/) for/specify,/clarify,/plan,/tasks,/analyze,/implementcommands - Project constitution (
.specify/memory/constitution.md) defining architectural principles:
Additional Workflow Improvements
Linter Configuration Updates
- Added
VALIDATE_BIOME_FORMAT: falsefor Biome formatter - Added
VALIDATE_GITHUB_ACTIONS_ZIZMOR: falsefor workflow security scanning - Added
VALIDATE_JSCPD: falsefor copy-paste detection - Consistent linting configuration across Build-Docs and Linter workflows
Test Workflow Enhancements
- Environment variables properly scoped at workflow level
- Clearer parameter naming (
OSNamevsOS) - Improved test execution coordination
Documentation
- Comprehensive setup/teardown guide in README.md
- Inline documentation in all prompt templates and scripts
- Usage examples for common test scenarios