diff --git a/.github/workflows/netcore.yml b/.github/workflows/netcore.yml index a959a97..0f00059 100644 --- a/.github/workflows/netcore.yml +++ b/.github/workflows/netcore.yml @@ -31,7 +31,14 @@ jobs: run: dotnet build ./EasyScrutor.sln --configuration Release --no-restore - name: Test - run: dotnet test ./EasyScrutor.sln --configuration Release --no-build --verbosity normal + run: dotnet test ./EasyScrutor.sln --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./TestResults + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + files: ./TestResults/**/coverage.cobertura.xml + fail_ci_if_error: false + token: ${{ secrets.CODECOV_TOKEN }} - name: Pack run: dotnet pack ./src/EasyScrutor/EasyScrutor.csproj -c Release --no-build -o ./packages diff --git a/CHANGELOG.md b/CHANGELOG.md index 2769366..28dc3d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,3 +63,28 @@ * add missing benefit point to documentation ([bcca87f](https://github.com/alexdresko/EasyScrutor/commit/bcca87f7ec6f013b7aae7140e5cc8054447fae35)) * add missing benefit point to documentation ([acf0ac6](https://github.com/alexdresko/EasyScrutor/commit/acf0ac62ed9a1f75dc33bb675d80553c835ae328)) + +--- + +## Major Changes Since Fork + +The following are the major changes made since forking from [Scrutor.AspNetCore](https://github.com/sefacan/Scrutor.AspNetCore): + +- **Project renamed** from Scrutor.AspNetCore to **EasyScrutor** to better reflect its purpose and remove misleading framework-specific naming +- **Removed service locator pattern** implementation (anti-pattern) and all ASP.NET Core-specific dependencies, making the library compatible with any .NET application using dependency injection +- **Multi-framework support**: Added support for .NET 8.0, 9.0, and 10.0 target frameworks +- **Complete test coverage**: Added comprehensive NUnit test suite with 43 tests across 6 test classes covering all lifetime marker interfaces +- **Example applications**: Created working examples for ASP.NET Core (Blazor Server, MVC, Web API) and console/worker services demonstrating the library works with any .NET application +- **Advanced filtering documentation**: Added comprehensive documentation on assembly filtering for performance optimization +- **Developer experience improvements**: + - Added .editorconfig and dotnet format support + - Added C# Copilot instructions + - XML documentation comments for all public APIs + - Created package.json for easy task automation +- **CI/CD improvements**: Updated GitHub Actions workflows to latest versions, added Release Please automation for semantic versioning +- **Code quality improvements**: Fixed code scanning alerts (proper LINQ usage, resource disposal, variable assignments) +- **Code formatting standardization**: Configured consistent line endings and added formatting verification to CI workflows +- **Community health files**: Added CODE_OF_CONDUCT.md and CONTRIBUTING.md +- **Enhanced NuGet package**: Added package icon, README inclusion, and improved metadata with automatic release notes +- **Build quality improvements**: Enabled Source Link (allows developers to step into the library source code during debugging), deterministic builds (ensures identical binaries across different machines for security and verification), embedded debugging symbols, and proper compiler flags for optimal builds and diagnostics +- Maintained backward compatibility with all six lifetime marker interfaces (IScopedLifetime, ITransientLifetime, ISingletonLifetime, and their Self* variants) diff --git a/README.md b/README.md index 88241b3..28ceac6 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ The original project was created by [sefacan](https://github.com/sefacan) and pr | Build server | Platform | Status | |-----------------|----------------|-------------| | Github Actions | All | ![Build Status](https://github.com/alexdresko/EasyScrutor/workflows/.NET%20Core%20CI/badge.svg) | +| Code Coverage | All | [![codecov](https://codecov.io/gh/alexdresko/EasyScrutor/branch/master/graph/badge.svg)](https://codecov.io/gh/alexdresko/EasyScrutor) | | NuGet | Package | [![NuGet](https://img.shields.io/nuget/v/EasyScrutor.svg)](https://www.nuget.org/packages/EasyScrutor/) | | NuGet | Downloads | [![NuGet Downloads](https://img.shields.io/nuget/dt/EasyScrutor.svg)](https://www.nuget.org/packages/EasyScrutor/) | | GitHub | Release | [![GitHub Release](https://img.shields.io/github/release/alexdresko/EasyScrutor.svg)](https://github.com/alexdresko/EasyScrutor/releases) | @@ -208,25 +209,4 @@ We welcome contributions! Please read our [CONTRIBUTING.md](CONTRIBUTING.md) gui ## Changelog -Major changes made since forking from [Scrutor.AspNetCore](https://github.com/sefacan/Scrutor.AspNetCore): - -- **Project renamed** from Scrutor.AspNetCore to **EasyScrutor** to better reflect its purpose and remove misleading framework-specific naming -- **Removed service locator pattern** implementation (anti-pattern) and all ASP.NET Core-specific dependencies, making the library compatible with any .NET application using dependency injection -- **Multi-framework support**: Added support for .NET 8.0, 9.0, and 10.0 target frameworks -- **Complete test coverage**: Added comprehensive NUnit test suite with 43 tests across 6 test classes covering all lifetime marker interfaces -- **Example applications**: Created working examples for ASP.NET Core (Blazor Server, MVC, Web API) and console/worker services demonstrating the library works with any .NET application -- **Advanced filtering documentation**: Added comprehensive documentation on assembly filtering for performance optimization -- **Developer experience improvements**: - - Added .editorconfig and dotnet format support - - Added C# Copilot instructions - - XML documentation comments for all public APIs - - Created package.json for easy task automation -- **CI/CD improvements**: Updated GitHub Actions workflows to latest versions, added Release Please automation for semantic versioning -- **Code quality improvements**: Fixed code scanning alerts (proper LINQ usage, resource disposal, variable assignments) -- **Code formatting standardization**: Configured consistent line endings and added formatting verification to CI workflows -- **Community health files**: Added CODE_OF_CONDUCT.md and CONTRIBUTING.md -- **Enhanced NuGet package**: Added package icon, README inclusion, and improved metadata with automatic release notes -- **Build quality improvements**: Enabled Source Link for debugging support, deterministic builds for reproducibility, and proper compiler flags -- Maintained backward compatibility with all six lifetime marker interfaces (IScopedLifetime, ITransientLifetime, ISingletonLifetime, and their Self* variants) - -Hello +See [CHANGELOG.md](CHANGELOG.md) for the complete version history and detailed list of changes since forking from [Scrutor.AspNetCore](https://github.com/sefacan/Scrutor.AspNetCore). diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 5e6655c..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,68 +0,0 @@ -# ASP.NET Core -# Build and test ASP.NET Core projects targeting .NET Core. -# Add steps that run tests, create a NuGet package, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core - -trigger: -- master - -variables: - netCoreSdkVersion: '3.1.101' - -jobs: -- job: Linux - pool: - vmImage: 'Ubuntu 16.04' - steps: - - task: DotNetCoreInstaller@0 - inputs: - packageType: 'sdk' - version: $(netCoreSdkVersion) - - script: dotnet build ./EasyScrutor.sln - displayName: 'dotnet build' - - script: dotnet test ./EasyScrutor.sln - displayName: 'run tests' - - task: PublishTestResults@2 - displayName: 'Publish Test Results **/*.trx' - condition: succeededOrFailed() - inputs: - testResultsFormat: VSTest - testResultsFiles: '**/*.trx' - -- job: macOS - pool: - vmImage: 'macOS-10.13' - steps: - - task: DotNetCoreInstaller@0 - inputs: - packageType: 'sdk' - version: $(netCoreSdkVersion) - - script: dotnet build ./EasyScrutor.sln - displayName: 'dotnet build' - - script: dotnet test ./EasyScrutor.sln - displayName: 'run tests' - - task: PublishTestResults@2 - displayName: 'Publish Test Results **/*.trx' - condition: succeededOrFailed() - inputs: - testResultsFormat: VSTest - testResultsFiles: '**/*.trx' - -- job: Windows - pool: - vmImage: 'windows-2019' - steps: - - task: DotNetCoreInstaller@0 - inputs: - packageType: 'sdk' - version: $(netCoreSdkVersion) - - script: dotnet build ./EasyScrutor.sln - displayName: 'dotnet build' - - script: dotnet test ./EasyScrutor.sln - displayName: 'run tests' - - task: PublishTestResults@2 - displayName: 'Publish Test Results **/*.trx' - condition: succeededOrFailed() - inputs: - testResultsFormat: VSTest - testResultsFiles: '**/*.trx' diff --git a/tests/EasyScrutor.Tests/EasyScrutor.Tests.csproj b/tests/EasyScrutor.Tests/EasyScrutor.Tests.csproj index 4e9bc12..972dd9f 100644 --- a/tests/EasyScrutor.Tests/EasyScrutor.Tests.csproj +++ b/tests/EasyScrutor.Tests/EasyScrutor.Tests.csproj @@ -8,6 +8,15 @@ true + + + true + opencover,cobertura + ./TestResults/ + [*.Tests]* + Obsolete,GeneratedCodeAttribute,CompilerGeneratedAttribute + +