From 6af9addd79d71ea955c09eb084e754bf8b52e3a6 Mon Sep 17 00:00:00 2001 From: Alex Dresko Date: Thu, 18 Dec 2025 11:03:27 -0500 Subject: [PATCH 1/8] fix: combine Release Please and NuGet publish into single workflow Moves NuGet publishing logic into the Release Please workflow as a second job that only runs when a release is created. This eliminates the need for PAT tokens and complex triggering between workflows. Benefits: - Simpler configuration (one workflow instead of two) - No PAT token required - NuGet publishes automatically when release is created - Removes the old standalone nuget-release.yml workflow --- .github/workflows/nuget-release.yml | 63 ---------------------------- .github/workflows/release-please.yml | 56 ++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 65 deletions(-) delete mode 100644 .github/workflows/nuget-release.yml diff --git a/.github/workflows/nuget-release.yml b/.github/workflows/nuget-release.yml deleted file mode 100644 index c48653d..0000000 --- a/.github/workflows/nuget-release.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: Publish to NuGet - -on: - push: - tags: - - 'v*.*.*' # Triggers on version tags like v1.0.0, v4.2.1, etc. - - 'EasyScrutor-v*.*.*' # Also support Release Please format with package prefix - workflow_dispatch: # Allows manual triggering from GitHub UI - inputs: - version: - description: 'Version to release (optional, uses csproj version if not provided)' - required: false - type: string - -jobs: - publish: - runs-on: ubuntu-latest - permissions: - contents: write - packages: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 # Get full history for proper versioning - - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: | - 8.0.x - 9.0.x - 10.0.x - - - name: Restore dependencies - run: dotnet restore ./EasyScrutor.sln - - - name: Verify code formatting - run: dotnet format ./EasyScrutor.sln --verify-no-changes --verbosity diagnostic - - - name: Build - run: dotnet build ./EasyScrutor.sln --configuration Release --no-restore - - - name: Run tests - run: dotnet test ./EasyScrutor.sln --configuration Release --no-build --verbosity normal - - - name: Pack NuGet package - run: dotnet pack ./src/EasyScrutor/EasyScrutor.csproj --configuration Release --no-build --output ./packages - - - name: Publish to NuGet.org - run: dotnet nuget push ./packages/*.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json --skip-duplicate - env: - NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }} - - - name: Create GitHub Release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - files: ./packages/*.nupkg - generate_release_notes: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 382514a..9e4bdf0 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -12,10 +12,62 @@ permissions: jobs: release-please: runs-on: ubuntu-latest + outputs: + release_created: ${{ steps.release.outputs.release_created }} + tag_name: ${{ steps.release.outputs.tag_name }} steps: - uses: googleapis/release-please-action@v4 + id: release with: - # Use manifest-based releases for multi-package repos - # This reads .release-please-manifest.json and release-please-config.json config-file: release-please-config.json manifest-file: .release-please-manifest.json + + publish-nuget: + needs: release-please + if: ${{ needs.release-please.outputs.release_created }} + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 8.0.x + 9.0.x + 10.0.x + + - name: Restore dependencies + run: dotnet restore ./EasyScrutor.sln + + - name: Verify code formatting + run: dotnet format ./EasyScrutor.sln --verify-no-changes --verbosity diagnostic + + - name: Build + run: dotnet build ./EasyScrutor.sln --configuration Release --no-restore + + - name: Run tests + run: dotnet test ./EasyScrutor.sln --configuration Release --no-build --verbosity normal + + - name: Pack NuGet package + run: dotnet pack ./src/EasyScrutor/EasyScrutor.csproj --configuration Release --no-build --output ./packages + + - name: Publish to NuGet.org + run: dotnet nuget push ./packages/*.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json --skip-duplicate + env: + NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }} + + - name: Upload package to GitHub Release + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{ needs.release-please.outputs.tag_name }} + files: ./packages/*.nupkg + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 0b4cd8a568d2f2986fce1d8d3e6ffea77f7d1ddc Mon Sep 17 00:00:00 2001 From: Alex Dresko Date: Thu, 18 Dec 2025 16:06:17 -0500 Subject: [PATCH 2/8] feat: inject Release Please notes into NuGet package metadata Uses the release notes generated by Release Please to populate the PackageReleaseNotes field when creating the NuGet package. This means the NuGet package page will show the actual changelog instead of just a link to GitHub releases. --- .github/workflows/release-please.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 9e4bdf0..6bd8c41 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -15,6 +15,7 @@ jobs: outputs: release_created: ${{ steps.release.outputs.release_created }} tag_name: ${{ steps.release.outputs.tag_name }} + body: ${{ steps.release.outputs.body }} steps: - uses: googleapis/release-please-action@v4 id: release @@ -57,7 +58,14 @@ jobs: run: dotnet test ./EasyScrutor.sln --configuration Release --no-build --verbosity normal - name: Pack NuGet package - run: dotnet pack ./src/EasyScrutor/EasyScrutor.csproj --configuration Release --no-build --output ./packages + run: | + # Extract release notes from CHANGELOG for this version + RELEASE_NOTES="${{ needs.release-please.outputs.body }}" + dotnet pack ./src/EasyScrutor/EasyScrutor.csproj \ + --configuration Release \ + --no-build \ + --output ./packages \ + /p:PackageReleaseNotes="$RELEASE_NOTES" - name: Publish to NuGet.org run: dotnet nuget push ./packages/*.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json --skip-duplicate From 8e7c557da0a6c6f4047b032a47db2ad2b1cdf23d Mon Sep 17 00:00:00 2001 From: Alex Dresko Date: Thu, 18 Dec 2025 16:10:57 -0500 Subject: [PATCH 3/8] docs: restore changelog section with fork history and Scrutor improvements Restores the comprehensive changelog that documents the journey from Scrutor.AspNetCore to EasyScrutor, including details about Scrutor dependency upgrades (v4.2.0 -> v7.0.0) with keyed service support, security fixes, and performance improvements. --- README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/README.md b/README.md index 4eb41a4..a3acbe2 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,19 @@ EasyScrutor is a modernized fork of the original [Scrutor.AspNetCore](https://gi The original project was created by [sefacan](https://github.com/sefacan) and provided a simple, convention-based approach to dependency injection. This fork maintains that simplicity while ensuring compatibility with modern .NET versions. +**Major improvements in Scrutor dependency (v4.2.0 -> v7.0.0):** +- **Keyed service registration support** - Leverage .NET 8's keyed DI for more advanced scenarios +- **Interface filtering for `AsSelfWithInterfaces`** - Better control over which interfaces to register +- **Security fix** - Resolved System.Text.Json vulnerability through DependencyModel update +- **Performance improvements** - Optimized decoration performance for applications with many services +- **Generic type support** - Better handling of generic ServiceDescriptor from C# 11+ +- **.NET 6 and .NET 8 support** - Full compatibility with modern .NET versions +- **Bug fixes**: + - Fixed multiple decoration layers for generic types + - Made DecoratedType and IsDecorated method public for extensibility + - Improved error handling when scanning assemblies + - Fixed generic type creation exceptions + ### Build Status | Build server | Platform | Status | |-----------------|----------------|-------------| @@ -181,4 +194,35 @@ builder.Services.AddAdvancedDependencyInjection(assembly => This can significantly improve application startup time by reducing the number of assemblies scanned for service registration. +## Examples + +See [examples/README.md](examples/README.md) for runnable sample apps (Web API, MVC, Blazor Server, and a console/worker host). + +## Contributing + +We welcome contributions! Please read our [CONTRIBUTING.md](CONTRIBUTING.md) guide to get started. + +## 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 From 51b77f8875a73afbf3cd50c0f46383156e67a5d0 Mon Sep 17 00:00:00 2001 From: Alex Dresko Date: Thu, 18 Dec 2025 19:03:09 -0500 Subject: [PATCH 4/8] docs: update README with NuGet package status badges and improve build status section --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a3acbe2..88241b3 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,11 @@ The original project was created by [sefacan](https://github.com/sefacan) and pr ### Build Status | Build server | Platform | Status | |-----------------|----------------|-------------| -| Github Actions | All |![](https://github.com/alexdresko/EasyScrutor/workflows/.NET%20Core%20CI/badge.svg) | +| Github Actions | All | ![Build Status](https://github.com/alexdresko/EasyScrutor/workflows/.NET%20Core%20CI/badge.svg) | +| 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) | +| License | MIT | [![License](https://img.shields.io/github/license/alexdresko/EasyScrutor.svg)](LICENSE) | ## Quick Start @@ -42,9 +46,9 @@ dotnet add package EasyScrutor **2. Mark your services with a lifetime interface:** ```csharp public interface IMyService { string GetMessage(); } -public class MyService : IMyService, IScopedLifetime -{ - public string GetMessage() => "Hello from EasyScrutor!"; +public class MyService : IMyService, IScopedLifetime +{ + public string GetMessage() => "Hello from EasyScrutor!"; } ``` From 0ba42f77683222414d5de98a385d69b69c290d03 Mon Sep 17 00:00:00 2001 From: Alex Dresko Date: Thu, 18 Dec 2025 19:06:16 -0500 Subject: [PATCH 5/8] docs: add GitHub Copilot instructions for repository operations and code style --- .github/copilot-instructions.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000..f3bcf8b --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,23 @@ +# GitHub Copilot Instructions for EasyScrutor + +## GitHub Operations + +### Always Use GitHub CLI (`gh`) +For all GitHub operations (creating PRs, issues, managing repositories), **always use the `gh` CLI** instead of GitHub API tools or MCP GitHub tools. + +#### Examples: +- **Create PR**: `gh pr create --base --head --title "title" --body "description"` +- **List PRs**: `gh pr list` +- **View PR**: `gh pr view ` +- **Create Issue**: `gh issue create --title "title" --body "description"` +- **List Issues**: `gh issue list` + +### Rationale +- Direct CLI integration with the repository +- Simpler authentication and configuration +- Consistent with developer workflow +- Better terminal-based experience + +## Code Style + +See [instructions/csharp.instructions.md](.github/instructions/csharp.instructions.md) for C# coding standards. From 04b37b7858fb41fd4720704d37e79a40fd0d50d2 Mon Sep 17 00:00:00 2001 From: Alex Dresko Date: Thu, 18 Dec 2025 20:42:58 -0500 Subject: [PATCH 6/8] docs: enhance build quality improvements section in README with detailed explanations --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 88241b3..15968cb 100644 --- a/README.md +++ b/README.md @@ -226,7 +226,7 @@ Major changes made since forking from [Scrutor.AspNetCore](https://github.com/se - **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 +- **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) Hello From 748a417710d46803512f80c8d408fdb06b8c1d52 Mon Sep 17 00:00:00 2001 From: Alex Dresko Date: Thu, 18 Dec 2025 20:47:11 -0500 Subject: [PATCH 7/8] docs: update README to reference detailed changelog and remove redundant major changes list --- CHANGELOG.md | 25 +++++++++++++++++++++++++ README.md | 23 +---------------------- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f04708..85103c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,3 +56,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 15968cb..d707744 100644 --- a/README.md +++ b/README.md @@ -208,25 +208,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 (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) - -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). From 8f4af9d84da1844488c380c203f55ea245663d5d Mon Sep 17 00:00:00 2001 From: Alex Dresko Date: Thu, 18 Dec 2025 20:56:38 -0500 Subject: [PATCH 8/8] Adds code coverage reporting with Codecov Integrates Codecov to track and report test coverage metrics. Configures the GitHub Actions workflow to collect coverage data during test runs and upload results to Codecov. Updates the README to display a coverage badge for visibility. Removes the deprecated Azure Pipelines configuration as the project has fully migrated to GitHub Actions for CI/CD. Configures the test project to generate coverage reports in both OpenCover and Cobertura formats, excluding test assemblies and generated code from coverage calculations. --- .github/workflows/netcore.yml | 9 ++- README.md | 1 + azure-pipelines.yml | 68 ------------------- .../EasyScrutor.Tests.csproj | 9 +++ 4 files changed, 18 insertions(+), 69 deletions(-) delete mode 100644 azure-pipelines.yml 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/README.md b/README.md index d707744..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) | 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 + +