Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into add-microsoft-extensi…
Browse files Browse the repository at this point in the history
…ons-dependencyinjection-plugin

* origin/main: (21 commits)
  Fix #56 autofac ambiguous stepdef and hook required #127 issue (#139)
  Reduce target framework of Reqnroll to netstandard2.0 (#130)
  Fix StackOverflowException when using [StepArgumentTransformation] with same input and output type (#136)
  MsTest: Replace DelayedFixtureTearDown special case with ClassCleanupBehavior.EndOfClass (#128)
  Temporarily disabled tests until #132 is resolved
  Add NUnit & xUnit core tests to portability suite
  Capture ExecutionContext after every binding invoke (#126)
  small improvement in CodeDomHelper to be able to chain async calls
  fix method name sources in UnitTestFeatureGenerator
  External data plugin, support for JSON files  (#118)
  UnitTests: Check if SDK version is installed and if not ignore the test (#109)
  Fix 111 ignore attr not inherited from rule (#113)
  Update README.md (#110)
  Fix 81 - modified CucumberExpressionParameterTypeRegistry to handle multiple custom types used as cucumber expressions when those types share the same short name. (#104)
  Update index.md
  Simplify test project targets (#105)
  Make SystemTests temp folder configurable and use NUGET_PACKAGES env var to override global NuGet folder
  Fleshing out Generation System Tests (2) (#99)
  Fix for 81 - Cucumber Expression using Enums errors when two enums exist with the same short name (#100)
  Include BoDi to Reqnroll package (#91) (#95)
  ...

# Conflicts:
#	Reqnroll.sln
#	Tests/Reqnroll.PluginTests/Reqnroll.PluginTests.csproj
  • Loading branch information
gasparnagy committed May 22, 2024
2 parents 9e21d55 + eef03e4 commit bba0666
Show file tree
Hide file tree
Showing 265 changed files with 3,827 additions and 3,966 deletions.
132 changes: 23 additions & 109 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,12 @@ jobs:
build_params: ${{ steps.versions.outputs.build_params }}
test_params: ${{ steps.versions.outputs.test_params }}
specs_filter: ${{ steps.versions.outputs.specs_filter }}
gh_logger_settings: ${{ steps.versions.outputs.gh_logger_settings }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- id: versions
name: Calculate versions
shell: pwsh
Expand Down Expand Up @@ -115,22 +112,26 @@ jobs:
}
Write-Output "main_build_params=$mainBuildParams" >> $env:GITHUB_OUTPUT
$testParams = "--no-build --verbosity normal -c $productConfig"
$gitHubActionsLoggerSettings = '"GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true;annotations.titleFormat=[@traits.Category] @test;annotations.messageFormat=@error\n@trace"'
$testParams = "--no-build --verbosity normal -c $productConfig --logger $gitHubActionsLoggerSettings -- RunConfiguration.CollectSourceInformation=true"
Write-Output "test_params=$testParams" >> $env:GITHUB_OUTPUT
Write-Output "Test Params: $testParams"
- name: Restore dependencies
run: dotnet restore
- name: Install Test Report Dependencies
run: |
dotnet add ./Tests/Reqnroll.RuntimeTests/Reqnroll.RuntimeTests.csproj package GitHubActionsTestLogger
dotnet add ./Tests/Reqnroll.PluginTests/Reqnroll.PluginTests.csproj package GitHubActionsTestLogger
dotnet add ./Tests/Reqnroll.GeneratorTests/Reqnroll.GeneratorTests.csproj package GitHubActionsTestLogger
- name: Build
run: dotnet build --no-restore ${{ steps.versions.outputs.main_build_params }}
- name: Runtime Tests
run: dotnet test ./Tests/Reqnroll.RuntimeTests/Reqnroll.RuntimeTests.csproj ${{ steps.versions.outputs.test_params }} -f net6.0
- name: Plugin Tests
run: dotnet test ./Tests/Reqnroll.PluginTests/Reqnroll.PluginTests.csproj ${{ steps.versions.outputs.test_params }} -f net6.0
run: dotnet test ./Tests/Reqnroll.RuntimeTests/Reqnroll.RuntimeTests.csproj --logger "trx;LogFileName=runtimetests-results.trx" ${{ steps.versions.outputs.test_params }}
- name: Generator Tests
run: dotnet test ./Tests/Reqnroll.GeneratorTests/Reqnroll.GeneratorTests.csproj ${{ steps.versions.outputs.test_params }} -f net6.0
- name: ExternalData Plugin Tests
run: dotnet test ./Plugins/Reqnroll.ExternalData/Reqnroll.ExternalData.ReqnrollPlugin.UnitTests/Reqnroll.ExternalData.ReqnrollPlugin.UnitTests.csproj ${{ steps.versions.outputs.test_params }} -f net6.0
run: dotnet test ./Tests/Reqnroll.GeneratorTests/Reqnroll.GeneratorTests.csproj --logger "trx;LogFileName=generatortests-results.trx" ${{ steps.versions.outputs.test_params }}
- name: Plugin Tests
run: dotnet test ./Tests/Reqnroll.PluginTests/Reqnroll.PluginTests.csproj --logger "trx;LogFileName=plugintests-results.trx" ${{ steps.versions.outputs.test_params }}
- name: Upload packages
uses: actions/upload-artifact@v4
with:
Expand All @@ -143,113 +144,30 @@ jobs:
name: build-trx
path: "**/*.trx"

specs-xunit:
runs-on: ubuntu-latest
needs: build

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore ${{ needs.build.outputs.build_params }}
- name: Set .NET 6 SDK
run: dotnet new globaljson --sdk-version 6.0.418
- name: xUnit Specs
shell: pwsh
run: dotnet test ./Tests/Reqnroll.Specs/Reqnroll.Specs.csproj ${{ needs.build.outputs.test_params }} -f net6.0 --filter "Category=xUnit&Category=Net60&Category!=requiresMsBuild${{ needs.build.outputs.specs_filter }}" --logger "trx;LogFileName=specs-xunit-results.trx"
- name: Publish xUnit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
check_name: xUnit Specs
files: "**/specs-xunit-results.trx"
comment_mode: off
- name: Upload TRX files
uses: actions/upload-artifact@v4
if: always()
with:
name: specs-xunit-trx
path: "**/specs-xunit-results.trx"

specs-nunit:
specs:
runs-on: ubuntu-latest
needs: build

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore ${{ needs.build.outputs.build_params }}
- name: Set .NET 6 SDK
run: dotnet new globaljson --sdk-version 6.0.418
- name: NUnit Specs
shell: pwsh
run: dotnet test ./Tests/Reqnroll.Specs/Reqnroll.Specs.csproj ${{ needs.build.outputs.test_params }} -f net6.0 --filter "Category=NUnit3&Category=Net60&Category!=requiresMsBuild${{ needs.build.outputs.specs_filter }}" --logger "trx;LogFileName=specs-nunit-results.trx"
- name: Publish NUnit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
check_name: NUnit Specs
files: "**/specs-nunit-results.trx"
comment_mode: off
- name: Upload TRX files
uses: actions/upload-artifact@v4
if: always()
with:
name: specs-nunit-trx
path: "**/specs-nunit-results.trx"

specs-mstest:
runs-on: ubuntu-latest
needs: build

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Install Test Report Dependencies
run: |
dotnet add ./Tests/Reqnroll.Specs/Reqnroll.Specs.csproj package GitHubActionsTestLogger
- name: Build
run: dotnet build --no-restore ${{ needs.build.outputs.build_params }}
- name: Set .NET 6 SDK
run: dotnet new globaljson --sdk-version 6.0.418
- name: MsTest Specs
- name: Specs
shell: pwsh
run: dotnet test ./Tests/Reqnroll.Specs/Reqnroll.Specs.csproj ${{ needs.build.outputs.test_params }} -f net6.0 --filter "Category=MsTest&Category=Net60&Category!=requiresMsBuild${{ needs.build.outputs.specs_filter }}" --logger "trx;LogFileName=specs-mstest-results.trx"
- name: Publish MSTest Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
check_name: MSTest Specs
files: "**/specs-mstest-results.trx"
comment_mode: off
run: dotnet test ./Tests/Reqnroll.Specs/Reqnroll.Specs.csproj --filter "Category!=quarantaine{{ needs.build.outputs.specs_filter }}" --logger "trx;LogFileName=specs-results.trx" ${{ needs.build.outputs.test_params }}
- name: Upload TRX files
uses: actions/upload-artifact@v4
if: always()
with:
name: specs-mstest-trx
path: "**/specs-mstest-results.trx"
name: specs-trx
path: "**/specs-results.trx"

system-tests-windows:
runs-on: windows-latest
Expand All @@ -272,9 +190,7 @@ jobs:
run: dotnet build --no-restore ${{ needs.build.outputs.build_params }}
- name: System Tests
shell: pwsh
run: |
$gitHubActionsLoggerSettings = '"GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true;annotations.titleFormat=[@traits.Category] @test;annotations.messageFormat=@error\n@trace"'
dotnet test ./Tests/Reqnroll.SystemTests/Reqnroll.SystemTests.csproj ${{ needs.build.outputs.test_params }} --logger "trx;LogFileName=systemtests-windows-results.trx" --logger $gitHubActionsLoggerSettings -- RunConfiguration.CollectSourceInformation=true
run: dotnet test ./Tests/Reqnroll.SystemTests/Reqnroll.SystemTests.csproj --logger "trx;LogFileName=systemtests-windows-results.trx" ${{ needs.build.outputs.test_params }}
- name: Upload Test Result TRX Files
uses: actions/upload-artifact@v4
if: always()
Expand Down Expand Up @@ -304,9 +220,7 @@ jobs:
run: dotnet build --no-restore ${{ needs.build.outputs.build_params }}
- name: System Tests
shell: pwsh
run: |
$gitHubActionsLoggerSettings = '"GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true;annotations.titleFormat=[@traits.Category] @test;annotations.messageFormat=@error\n@trace"'
dotnet test ./Tests/Reqnroll.SystemTests/Reqnroll.SystemTests.csproj ${{ needs.build.outputs.test_params }} --filter "TestCategory!=MsBuild&TestCategory!=Net481" --logger "trx;LogFileName=systemtests-linux-results.trx" --logger $gitHubActionsLoggerSettings -- RunConfiguration.CollectSourceInformation=true
run: dotnet test ./Tests/Reqnroll.SystemTests/Reqnroll.SystemTests.csproj --filter "TestCategory!=MsBuild&TestCategory!=Net481" --logger "trx;LogFileName=systemtests-linux-results.trx" ${{ needs.build.outputs.test_params }}
- name: Upload Test Result TRX Files
uses: actions/upload-artifact@v4
if: always()
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -385,3 +385,4 @@ docs/_build/*
/docs/Lib/
/docs/Scripts/
/docs/pyvenv.cfg
nCrunchTemp*.csproj
7 changes: 1 addition & 6 deletions .ncrunch/Reqnroll.Autofac.ReqnrollPlugin.v3.ncrunchproject
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<ProjectConfiguration>
<Settings>
<CustomBuildProperties>
<Value>TargetFrameworks = net6.0</Value>
</CustomBuildProperties>
<IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely>
</Settings>
<Settings />
</ProjectConfiguration>
3 changes: 0 additions & 3 deletions .ncrunch/Reqnroll.CustomPlugin.v3.ncrunchproject
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<ProjectConfiguration>
<Settings>
<CustomBuildProperties>
<Value>TargetFrameworks = net6.0</Value>
</CustomBuildProperties>
<IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely>
</Settings>
</ProjectConfiguration>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<ProjectConfiguration>
<Settings>
<CustomBuildProperties>
<Value>TargetFrameworks = net6.0</Value>
</CustomBuildProperties>
<IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely>
</Settings>
<Settings />
</ProjectConfiguration>
7 changes: 1 addition & 6 deletions .ncrunch/Reqnroll.Generator.v3.ncrunchproject
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<ProjectConfiguration>
<Settings>
<CustomBuildProperties>
<Value>TargetFrameworks = net6.0</Value>
</CustomBuildProperties>
<IgnoreThisComponentCompletely>False</IgnoreThisComponentCompletely>
</Settings>
<Settings />
</ProjectConfiguration>
4 changes: 0 additions & 4 deletions .ncrunch/Reqnroll.GeneratorTests.v3.ncrunchproject
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<ProjectConfiguration>
<Settings>
<CustomBuildProperties>
<Value>TargetFrameworks = net6.0</Value>
</CustomBuildProperties>
<ConsiderInconclusiveTestsAsPassing>True</ConsiderInconclusiveTestsAsPassing>
<IgnoreThisComponentCompletely>False</IgnoreThisComponentCompletely>
</Settings>
</ProjectConfiguration>
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<ProjectConfiguration>
<Settings>
<CustomBuildProperties>
<Value>TargetFrameworks = net6.0</Value>
<Value>TargetFrameworks = netstandard2.0</Value>
</CustomBuildProperties>
<IgnoreThisComponentCompletely>False</IgnoreThisComponentCompletely>
</Settings>
</ProjectConfiguration>
3 changes: 0 additions & 3 deletions .ncrunch/Reqnroll.MSTest.ReqnrollPlugin.v3.ncrunchproject
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<ProjectConfiguration>
<Settings>
<CustomBuildProperties>
<Value>TargetFrameworks = net6.0</Value>
</CustomBuildProperties>
<IgnoreThisComponentCompletely>False</IgnoreThisComponentCompletely>
</Settings>
</ProjectConfiguration>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<ProjectConfiguration>
<Settings>
<CustomBuildProperties>
<Value>TargetFrameworks = net6.0</Value>
</CustomBuildProperties>
<IgnoreThisComponentCompletely>False</IgnoreThisComponentCompletely>
<NUnit3Enabled>False</NUnit3Enabled>
</Settings>
</ProjectConfiguration>
5 changes: 1 addition & 4 deletions .ncrunch/Reqnroll.NUnit.ReqnrollPlugin.v3.ncrunchproject
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<ProjectConfiguration>
<Settings>
<CustomBuildProperties>
<Value>TargetFrameworks = net6.0</Value>
</CustomBuildProperties>
<IgnoreThisComponentCompletely>False</IgnoreThisComponentCompletely>
<NUnit3Enabled>False</NUnit3Enabled>
</Settings>
</ProjectConfiguration>
15 changes: 11 additions & 4 deletions .ncrunch/Reqnroll.PluginTests.v3.ncrunchproject
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
<ProjectConfiguration>
<Settings>
<CustomBuildProperties>
<Value>TargetFrameworks = net6.0</Value>
</CustomBuildProperties>
<IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely>
<AdditionalFilesToIncludeForProject>
<Value>ExternalData\SampleFiles\**.*</Value>
</AdditionalFilesToIncludeForProject>
<IgnoredTests>
<NamedTestSelector>
<TestName>Reqnroll.PluginTests.Generator.GeneratorPluginLoaderTests.LoadPlugin_LoadXUnitSuccessfully</TestName>
</NamedTestSelector>
<NamedTestSelector>
<TestName>Reqnroll.PluginTests.Infrastructure.WindsorPluginTests.Can_load_Windsor_plugin</TestName>
</NamedTestSelector>
</IgnoredTests>
</Settings>
</ProjectConfiguration>
3 changes: 0 additions & 3 deletions .ncrunch/Reqnroll.RuntimeTests.v3.ncrunchproject
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<ProjectConfiguration>
<Settings>
<CustomBuildProperties>
<Value>TargetFrameworks = net6.0</Value>
</CustomBuildProperties>
<ConsiderInconclusiveTestsAsPassing>True</ConsiderInconclusiveTestsAsPassing>
<IgnoreThisComponentCompletely>False</IgnoreThisComponentCompletely>
</Settings>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<ProjectConfiguration>
<Settings>
<CustomBuildProperties>
<Value>TargetFrameworks = net6.0</Value>
<Value>TargetFrameworks = netstandard2.0</Value>
</CustomBuildProperties>
<IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely>
</Settings>
</ProjectConfiguration>
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<ProjectConfiguration>
<Settings>
<CustomBuildProperties>
<Value>TargetFrameworks = net6.0</Value>
<Value>TargetFrameworks = netstandard2.0</Value>
</CustomBuildProperties>
<IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely>
</Settings>
</ProjectConfiguration>

This file was deleted.

3 changes: 0 additions & 3 deletions .ncrunch/Reqnroll.Specs.v3.ncrunchproject
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<ProjectConfiguration>
<Settings>
<CustomBuildProperties>
<Value>TargetFrameworks = net6.0</Value>
</CustomBuildProperties>
<IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely>
</Settings>
</ProjectConfiguration>
3 changes: 0 additions & 3 deletions .ncrunch/Reqnroll.Templates.DotNet.v3.ncrunchproject
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<ProjectConfiguration>
<Settings>
<CustomBuildProperties>
<Value>TargetFrameworks = net6.0</Value>
</CustomBuildProperties>
<IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely>
</Settings>
</ProjectConfiguration>
Loading

0 comments on commit bba0666

Please sign in to comment.