docs: improve CLAUDE.md with testing, CI/CD, and module prep details#110
docs: improve CLAUDE.md with testing, CI/CD, and module prep details#110
Conversation
- Add Testing section with Scripts/Test.ps1 commands and Pester v5 context - Document PSD1 $version$/$prerelease$ template variables in Module Preparation - Update CI/CD section to list all 3 workflows with accurate trigger descriptions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates repository guidance in CLAUDE.md to better document local testing, module preparation details, and GitHub Actions workflows, aligning contributor instructions with existing scripts and CI behavior.
Changes:
- Document
.\Scripts\Test.ps1usage (including-SkipBuildand-Configuration) and summarize Pester v5 test coverage. - Explain the
$version$/$prerelease$placeholders used in the module manifest template. - Expand the CI/CD section to list all three workflows and describe their triggers.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # The PSD1 contains $version$ and $prerelease$ placeholders replaced at release time | ||
| ``` | ||
|
|
||
| **Note:** `7Zip4PowerShell.psd1` uses `$version$` and `$prerelease$` template variables. The release workflow replaces these from GitVersion outputs. For local use, the module loads fine without replacement. |
There was a problem hiding this comment.
The note says the module “loads fine without replacement”, but the manifest’s ModuleVersion = '$version$' is not a valid version and Import-Module using the PSD1 will fail until placeholders are replaced. Consider clarifying that local usage should import the DLL directly (as tests do) or instruct how to replace the placeholders for manifest-based import.
| **Note:** `7Zip4PowerShell.psd1` uses `$version$` and `$prerelease$` template variables. The release workflow replaces these from GitVersion outputs. For local use, the module loads fine without replacement. | |
| **Note:** `7Zip4PowerShell.psd1` uses `$version$` and `$prerelease$` template variables. Until these placeholders are replaced with real values (e.g., by the release workflow or a local script), the manifest is not valid for `Import-Module`. For local development, import the compiled DLL directly (as the tests do), or run the same placeholder-replacement step before using the PSD1 for manifest-based import. |
| # The PSD1 contains $version$ and $prerelease$ placeholders replaced at release time | ||
| ``` | ||
|
|
||
| **Note:** `7Zip4PowerShell.psd1` uses `$version$` and `$prerelease$` template variables. The release workflow replaces these from GitVersion outputs. For local use, the module loads fine without replacement. |
There was a problem hiding this comment.
7Zip4PowerShell.psd1 casing doesn’t match the repository file name (7Zip4Powershell.psd1). Even though CI runs on Windows (case-insensitive), this can confuse contributors and breaks copy/paste on case-sensitive filesystems; consider using the exact filename as it appears in the repo.
| **Note:** `7Zip4PowerShell.psd1` uses `$version$` and `$prerelease$` template variables. The release workflow replaces these from GitVersion outputs. For local use, the module loads fine without replacement. | |
| **Note:** `7Zip4Powershell.psd1` uses `$version$` and `$prerelease$` template variables. The release workflow replaces these from GitVersion outputs. For local use, the module loads fine without replacement. |
| - **PR Build** (`pr-build.yml`): Builds and validates pull requests | ||
| - **Release Publish** (`release-publish.yml`): Builds and publishes to PowerShell Gallery when tagged | ||
| - **PR Build** (`pr-build.yml`): Builds, runs tests on every PR targeting master | ||
| - **Release and Publish** (`release-publish.yml`): Runs on every push to master and on manual dispatch; the `release` job (PowerShell Gallery publish + GitHub Release) only runs on `v*` tags |
There was a problem hiding this comment.
The release-publish.yml workflow doesn’t have a separate release job; it has a single job where only the “Publish to PowerShell Gallery” step is gated by startsWith(github.ref, 'refs/tags/v'). Also, the workflow triggers on both pushes to master and pushes of v* tags—consider updating this description to match the actual triggers/conditions.
| - **Release and Publish** (`release-publish.yml`): Runs on every push to master and on manual dispatch; the `release` job (PowerShell Gallery publish + GitHub Release) only runs on `v*` tags | |
| - **Release and Publish** (`release-publish.yml`): Single-job workflow triggered on pushes to `master`, pushes of `v*` tags, and manual dispatch; only the "Publish to PowerShell Gallery" step runs for `v*` tags (gated by `startsWith(github.ref, 'refs/tags/v')`) |
Summary
.\Scripts\Test.ps1with-SkipBuildand-Configurationoptions, plus Pester v5 context$version$/$prerelease$PSD1 template variables in Module Preparation to avoid confusion for local buildspr-build.yml,release-publish.yml,update-7zip-dlls.yml) with accurate trigger descriptionsTest plan
.\Scripts\Test.ps1commands match actual script parameters🤖 Generated with Claude Code