You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specs/001-building-on-this/plan.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@
31
31
- Phase 3-4: Implementation execution (manual or via tools)
32
32
33
33
## Summary
34
-
Extract BeforeAll/AfterAll test setup/teardown logic from Test-ModuleLocal.yml into a reusable local composite action. This reduces workflow duplication, improves maintainability, and enables reuse across workflows. The single composite action will accept a mode parameter (before/after) to control which script to execute (BeforeAll.ps1 or AfterAll.ps1) and error handling behavior. The action will be located at `.github/actions/setup-test/action.yml` and will integrate with existing PSModule/GitHub-Script and PSModule/Install-PSModuleHelpers actions.
34
+
Extract BeforeAll/AfterAll test setup/teardown logic from Test-ModuleLocal.yml into a reusable local composite action. This reduces workflow duplication, improves maintainability, and enables reuse across workflows. The single composite action will accept a mode parameter (before/after) to control which script to execute (BeforeAll.ps1 or AfterAll.ps1) and error handling behavior. The action will be located at `.github/actions/setup-test/action.yml` and will integrate with existing PSModule/GitHub-Script and PSModule/Install-PSModuleHelpers actions. Documentation will clearly explain that BeforeAll/AfterAll scripts are intended for managing external test resources (cloud infrastructure, external databases, third-party services) that are independent of the test platform/OS, while test-specific resources should be created within the tests themselves.
Copy file name to clipboardExpand all lines: specs/001-building-on-this/quickstart.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,45 @@
8
8
9
9
This quickstart provides a minimal integration path and validation steps for the setup-test composite action. Follow these steps to verify the feature works as expected.
10
10
11
+
## Intended Use Case (FR-021)
12
+
13
+
**BeforeAll/AfterAll scripts are designed for managing external test resources** that are independent of the test platform/OS. These scripts should:
14
+
15
+
✅ **DO use for**:
16
+
- Deploying cloud infrastructure via APIs (Azure, AWS, GCP)
17
+
- Creating external database instances or schemas
18
+
- Initializing test data in third-party SaaS platforms
19
+
- Setting up API test environments
20
+
- Configuring external services that all tests will use
21
+
22
+
❌ **DON'T use for**:
23
+
- Installing OS-specific dependencies (do this in test setup)
24
+
- Creating platform-specific test files (do this within tests)
25
+
- Test-specific resources for individual matrix combinations (do this in tests)
26
+
27
+
**Example BeforeAll.ps1** (External Resources):
28
+
```powershell
29
+
# Deploy Azure resources for testing
30
+
Write-Host "Creating Azure test resources..."
31
+
az group create --name "test-rg-$env:GITHUB_RUN_ID" --location eastus
32
+
az storage account create --name "teststorage$env:GITHUB_RUN_ID" --resource-group "test-rg-$env:GITHUB_RUN_ID"
33
+
34
+
# Initialize external database
35
+
Write-Host "Creating test database..."
36
+
Invoke-RestMethod -Uri "https://api.example.com/databases" -Method POST -Body @{name="test-db-$env:GITHUB_RUN_ID"}
0 commit comments