Create NuGet template package for test framework#2
Merged
fszymaniak merged 2 commits intomainfrom Nov 18, 2025
Merged
Conversation
Major Changes: - Create .template.config with template.json and CLI parameter mappings - Add NuGet package specification (.nuspec) for template distribution - Upgrade from .NET 7.0 to .NET 8.0 LTS - Update all NuGet packages to latest stable versions - Create interactive PowerShell setup script (setup.ps1) - Enhance GitHub Actions workflow with multi-OS testing, coverage, and security scanning - Add comprehensive documentation (TEMPLATE_USAGE.md, CHANGES.md) Template Features: - Customizable via CLI parameters (test type, framework, test runner, etc.) - Conditional file inclusion (WireMock, examples, CI/CD) - Support for .NET 8.0 and 9.0 - Multiple test runners: NUnit, xUnit, MSTest - Interactive and non-interactive setup modes Package Updates: - Autofac.Extensions.DependencyInjection: 9.0.0 → 10.0.0 - Microsoft.NET.Test.Sdk: 17.7.1 → 17.11.1 - NUnit3TestAdapter: 4.5.0 → 4.6.0 - RestSharp: 110.2.1-alpha → 112.1.0 (stable) - WireMock.Net: 1.5.49 → 1.6.8 - coverlet.collector: 3.2.0 → 6.0.2 - Added NUnit: 4.2.2 CI/CD Improvements: - Multi-platform testing (Ubuntu, Windows, macOS) - Code coverage collection and reporting - Living documentation generation - Security vulnerability scanning - Automatic template packaging on main branch - Test results and artifacts upload Documentation: - Template usage guide with installation/publishing instructions - Comprehensive README template for generated projects - Change log with migration details - Interactive setup script with validation Users can now install with: dotnet new install TestFrameworkBoilerplate.Template And create projects with: dotnet new testfw -n MyProject [options] Or use interactive mode: pwsh setup.ps1
Fixes: 1. Add workflow-level permissions for checks and pull requests - Resolves "Resource not accessible by integration" error - Allows test-reporter action to create check runs 2. Make test reporter non-blocking - Add continue-on-error to prevent workflow failure - Useful for fork PRs where permissions may be limited 3. Fix template packaging step - Replace dotnet pack with nuget pack - Use .nuspec file for proper template packaging - Auto-increment version with GitHub run number (1.0.X) - Add nuget/setup-nuget action for NuGet CLI Permissions added: - contents: read (for checkout) - checks: write (for test reports) - pull-requests: write (for PR comments) These changes ensure the CI/CD pipeline runs successfully and properly packages the template as a NuGet package.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Major Changes:
Template Features:
Package Updates:
CI/CD Improvements:
Documentation:
Users can now install with:
dotnet new install TestFrameworkBoilerplate.Template
And create projects with:
dotnet new testfw -n MyProject [options]
Or use interactive mode:
pwsh setup.ps1