Skip to content

Commit 51099a3

Browse files
committed
Merge remote-tracking branch 'origin/master' into improve_reference_solving
# Conflicts: # src/Stryker.Core/Stryker.Core.UnitTest/Initialisation/BuildAnalyzerTestsBase.cs # src/Stryker.Utilities/Buildalyzer/IAnalyzerResultExtensions.cs
2 parents 058f788 + 0a54fa7 commit 51099a3

File tree

288 files changed

+4743
-1954
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

288 files changed

+4743
-1954
lines changed

.github/workflows/integration-test.yaml

+6-21
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,16 @@ run-name: e2e ${{ github.head_ref }} on m1 macos
33

44
on: [pull_request]
55

6-
env:
7-
NUGET_FEED: https://f.feedz.io/stryker/stryker-net/nuget/index.json
8-
FEEDZ_NUGET_API_KEY: T-9O45ZZZ5lwQ6ptrGpDuoX8tdZLliNkScn9k
9-
RestoreLockedMode: true
10-
VERSION: "0.0.0-github-${{ github.run_number }}"
11-
126
jobs:
137
integration-test:
148
runs-on: macos-14
159
steps:
1610
- uses: actions/checkout@v4
1711
- uses: actions/setup-dotnet@v4
1812
with:
19-
dotnet-version: 8.x
20-
- uses: actions/setup-dotnet@v4
21-
with:
22-
dotnet-version: 9.x
23-
- name: Pack integration test package
24-
run: dotnet pack ${{ github.workspace }}/src/Stryker.CLI/Stryker.CLI/Stryker.CLI.csproj -p:PackageVersion=$VERSION --output ${{ github.workspace }}/publish
25-
- name: Publish integration test package
26-
run: dotnet nuget push ${{ github.workspace }}/publish/*.nupkg -s $NUGET_FEED -k "$FEEDZ_NUGET_API_KEY"
27-
- name: Install integration test package from feed
28-
run: dotnet tool install dotnet-stryker --tool-path ${{ github.workspace }}/.nuget/tools --version $VERSION --add-source $NUGET_FEED
29-
- name: Run integration test
30-
run: ${{ github.workspace }}/.nuget/tools/dotnet-stryker --dev-mode
31-
working-directory: ${{ github.workspace }}/integrationtest/TargetProjects/NetCore/NetCoreTestProject.XUnit
32-
- name: Validate integration test result
33-
run: dotnet test ${{ github.workspace }}/integrationtest/Validation/ValidationProject --filter Category=SingleTestProject
13+
dotnet-version: |
14+
8.x
15+
9.x
16+
- name: Run integration tests
17+
shell: pwsh
18+
run: .\integration-tests.ps1

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -289,3 +289,4 @@ StrykerLogs/
289289
*.DotSettings
290290
/src/Stryker.CLI/TestStatisticsAnalyzer/test-stats-report.json
291291
.DS_Store
292+
.nuget/

ExampleProjects/FsharpMutateTestApp/boolMutateTestApp.Test/boolMutateTestApp.Test.fsproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</ItemGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
16+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
1717
<PackageReference Include="xunit" Version="2.9.3" />
1818
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
1919
<PackageReference Include="coverlet.collector" Version="6.0.4" />

ExampleProjects/Xamarin.Forms/Xamarin.Forms.Tests/Xamarin.Forms.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
1111
<PackageReference Include="xunit" Version="2.9.3" />
1212
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
1313
<PackageReference Include="coverlet.collector" Version="6.0.4" />

azure-pipelines.yml

+18-6
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,20 @@ stages:
4949
dependsOn: []
5050
steps:
5151
- task: UseDotNet@2
52-
displayName: 'Use dotnet'
52+
displayName: 'Install dotnet 8'
5353
inputs:
5454
version: 8.x
5555
- task: UseDotNet@2
56-
displayName: 'Use dotnet'
56+
displayName: 'Install dotnet 9'
5757
inputs:
5858
version: 9.x
59+
- task: DotNetCoreCLI@2
60+
displayName: 'Install dotnet-coverage'
61+
inputs:
62+
command: custom
63+
custom: tool
64+
arguments: install dotnet-coverage --tool-path $(Agent.BuildDirectory)/tools
65+
includeNuGetOrg: true
5966
- template: pipeline-templates/populate-cache-steps.yml
6067
- task: SonarCloudPrepare@3
6168
inputs:
@@ -65,12 +72,17 @@ stages:
6572
projectKey: 'stryker-net'
6673
projectName: 'Stryker .NET'
6774
projectVersion: '$(PackageVersion)'
75+
extraProperties: |
76+
sonar.verbose=true
77+
sonar.cs.vscoveragexml.reportsPaths=$(Agent.BuildDirectory)\TestResults\coverage.xml
6878
- task: DotNetCoreCLI@2
69-
displayName: 'Run unit tests'
79+
displayName: 'Build Stryker'
7080
inputs:
71-
command: test
72-
projects: 'src/Stryker.Core/Stryker.Core.UnitTest/Stryker.Core.UnitTest.csproj'
73-
arguments: '--collect "Code coverage"'
81+
command: 'build'
82+
projects: 'src/Stryker.sln'
83+
- pwsh: '$(Agent.BuildDirectory)/tools/dotnet-coverage collect "dotnet test" -f xml -o "$(Agent.BuildDirectory)\TestResults\coverage.xml"'
84+
displayName: 'Run unit tests'
85+
workingDirectory: 'src'
7486
- task: SonarCloudAnalyze@3
7587
- task: SonarCloudPublish@3
7688
inputs:

integration-tests.ps1

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#! /usr/bin/env pwsh
2+
3+
#Requires -PSEdition Core
4+
#Requires -Version 7
5+
6+
param()
7+
8+
$ErrorActionPreference = "Stop"
9+
10+
${env:RestoreLockedMode} = "true"
11+
12+
$repoRoot = ${env:GITHUB_WORKSPACE} ?? $PSScriptRoot
13+
14+
$publishPath = Join-Path $repoRoot "publish"
15+
16+
$netCoreTargetPath = Join-Path $repoRoot "integrationtest" "TargetProjects" "NetCore" "NetCoreTestProject.XUnit"
17+
$netfxTargetPath = Join-Path $repoRoot "integrationtest" "TargetProjects" "NetFramework" "FullFrameworkApp.Test"
18+
19+
$testPath = Join-Path $repoRoot "integrationtest" "Validation" "ValidationProject"
20+
$testFilter = "Category=SingleTestProject"
21+
22+
$toolPath = Join-Path $repoRoot ".nuget" "tools"
23+
$toolProject = Join-Path $repoRoot "src" "Stryker.CLI" "Stryker.CLI" "Stryker.CLI.csproj"
24+
25+
$toolVersion = "0.0.0-"
26+
27+
if (${env:GITHUB_ACTIONS} -eq "true") {
28+
$toolVersion += "github-${env:GITHUB_RUN_NUMBER}"
29+
} else {
30+
$toolVersion += "localdev"
31+
}
32+
33+
$stryker = Join-Path $toolPath "dotnet-stryker"
34+
35+
dotnet pack $toolProject "-p:PackageVersion=${toolVersion}" --output $publishPath
36+
37+
if ($LASTEXITCODE -ne 0) {
38+
throw "dotnet pack failed with exit code ${LASTEXITCODE}"
39+
}
40+
41+
dotnet tool install dotnet-stryker --add-source $publishPath --allow-downgrade --tool-path $toolPath --version $toolVersion
42+
43+
if ($LASTEXITCODE -ne 0) {
44+
throw "dotnet tool install failed with exit code ${LASTEXITCODE}"
45+
}
46+
47+
pushd $netCoreTargetPath
48+
49+
try {
50+
& $stryker --dev-mode
51+
} finally {
52+
popd
53+
}
54+
55+
if ($LASTEXITCODE -ne 0) {
56+
throw "dotnet-stryker failed for .NET with exit code ${LASTEXITCODE}"
57+
}
58+
59+
if ($IsWindows) {
60+
pushd $netfxTargetPath
61+
62+
try {
63+
dotnet msbuild -t:restore
64+
65+
if ($LASTEXITCODE -ne 0) {
66+
throw "dotnet msbuild failed to restore NuGet packages with exit code ${LASTEXITCODE}"
67+
}
68+
69+
& $stryker --dev-mode
70+
71+
if ($LASTEXITCODE -ne 0) {
72+
throw "dotnet-stryker failed for .NET Framework with exit code ${LASTEXITCODE}"
73+
}
74+
} finally {
75+
popd
76+
}
77+
}
78+
79+
dotnet test $testPath --filter $testFilter
80+
81+
if ($LASTEXITCODE -ne 0) {
82+
throw "dotnet test failed with exit code ${LASTEXITCODE}"
83+
}

integrationtest/TargetProjects/NetCore/EmptyTestProject/EmptyTestProject.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
1414
<PackageReference Include="xunit" Version="2.9.3" />
1515
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
1616
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

integrationtest/TargetProjects/NetCore/EmptyTestProject/packages.lock.json

+13-13
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
},
1111
"Microsoft.NET.Test.Sdk": {
1212
"type": "Direct",
13-
"requested": "[17.12.0, )",
14-
"resolved": "17.12.0",
15-
"contentHash": "kt/PKBZ91rFCWxVIJZSgVLk+YR+4KxTuHf799ho8WNiK5ZQpJNAEZCAWX86vcKrs+DiYjiibpYKdGZP6+/N17w==",
13+
"requested": "[17.13.0, )",
14+
"resolved": "17.13.0",
15+
"contentHash": "W19wCPizaIC9Zh47w8wWI/yxuqR7/dtABwOrc8r2jX/8mUNxM2vw4fXDh+DJTeogxV+KzKwg5jNNGQVwf3LXyA==",
1616
"dependencies": {
17-
"Microsoft.CodeCoverage": "17.12.0",
18-
"Microsoft.TestPlatform.TestHost": "17.12.0"
17+
"Microsoft.CodeCoverage": "17.13.0",
18+
"Microsoft.TestPlatform.TestHost": "17.13.0"
1919
}
2020
},
2121
"xunit": {
@@ -52,23 +52,23 @@
5252
},
5353
"Microsoft.CodeCoverage": {
5454
"type": "Transitive",
55-
"resolved": "17.12.0",
56-
"contentHash": "4svMznBd5JM21JIG2xZKGNanAHNXplxf/kQDFfLHXQ3OnpJkayRK/TjacFjA+EYmoyuNXHo/sOETEfcYtAzIrA=="
55+
"resolved": "17.13.0",
56+
"contentHash": "9LIUy0y+DvUmEPtbRDw6Bay3rzwqFV8P4efTrK4CZhQle3M/QwLPjISghfcolmEGAPWxuJi6m98ZEfk4VR4Lfg=="
5757
},
5858
"Microsoft.TestPlatform.ObjectModel": {
5959
"type": "Transitive",
60-
"resolved": "17.12.0",
61-
"contentHash": "TDqkTKLfQuAaPcEb3pDDWnh7b3SyZF+/W9OZvWFp6eJCIiiYFdSB6taE2I6tWrFw5ywhzOb6sreoGJTI6m3rSQ==",
60+
"resolved": "17.13.0",
61+
"contentHash": "bt0E0Dx+iqW97o4A59RCmUmz/5NarJ7LRL+jXbSHod72ibL5XdNm1Ke+UO5tFhBG4VwHLcSjqq9BUSblGNWamw==",
6262
"dependencies": {
6363
"System.Reflection.Metadata": "1.6.0"
6464
}
6565
},
6666
"Microsoft.TestPlatform.TestHost": {
6767
"type": "Transitive",
68-
"resolved": "17.12.0",
69-
"contentHash": "MiPEJQNyADfwZ4pJNpQex+t9/jOClBGMiCiVVFuELCMSX2nmNfvUor3uFVxNNCg30uxDP8JDYfPnMXQzsfzYyg==",
68+
"resolved": "17.13.0",
69+
"contentHash": "9GGw08Dc3AXspjekdyTdZ/wYWFlxbgcF0s7BKxzVX+hzAwpifDOdxM+ceVaaJSQOwqt3jtuNlHn3XTpKUS9x9Q==",
7070
"dependencies": {
71-
"Microsoft.TestPlatform.ObjectModel": "17.12.0",
71+
"Microsoft.TestPlatform.ObjectModel": "17.13.0",
7272
"Newtonsoft.Json": "13.0.1"
7373
}
7474
},
@@ -141,7 +141,7 @@
141141
"targetproject": {
142142
"type": "Project",
143143
"dependencies": {
144-
"Library": "[4.5.0, )",
144+
"Library": "[4.5.1, )",
145145
"Microsoft.CodeAnalysis.Common": "[4.12.0, )",
146146
"Serilog": "[4.2.0, )"
147147
}

integrationtest/TargetProjects/NetCore/ExtraProject.XUnit/ExtraProject.XUnit.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
1111
<PackageReference Include="xunit" Version="2.9.3" />
1212
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
1313
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

integrationtest/TargetProjects/NetCore/ExtraProject.XUnit/packages.lock.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
},
1111
"Microsoft.NET.Test.Sdk": {
1212
"type": "Direct",
13-
"requested": "[17.12.0, )",
14-
"resolved": "17.12.0",
15-
"contentHash": "kt/PKBZ91rFCWxVIJZSgVLk+YR+4KxTuHf799ho8WNiK5ZQpJNAEZCAWX86vcKrs+DiYjiibpYKdGZP6+/N17w==",
13+
"requested": "[17.13.0, )",
14+
"resolved": "17.13.0",
15+
"contentHash": "W19wCPizaIC9Zh47w8wWI/yxuqR7/dtABwOrc8r2jX/8mUNxM2vw4fXDh+DJTeogxV+KzKwg5jNNGQVwf3LXyA==",
1616
"dependencies": {
17-
"Microsoft.CodeCoverage": "17.12.0",
18-
"Microsoft.TestPlatform.TestHost": "17.12.0"
17+
"Microsoft.CodeCoverage": "17.13.0",
18+
"Microsoft.TestPlatform.TestHost": "17.13.0"
1919
}
2020
},
2121
"xunit": {
@@ -40,23 +40,23 @@
4040
},
4141
"Microsoft.CodeCoverage": {
4242
"type": "Transitive",
43-
"resolved": "17.12.0",
44-
"contentHash": "4svMznBd5JM21JIG2xZKGNanAHNXplxf/kQDFfLHXQ3OnpJkayRK/TjacFjA+EYmoyuNXHo/sOETEfcYtAzIrA=="
43+
"resolved": "17.13.0",
44+
"contentHash": "9LIUy0y+DvUmEPtbRDw6Bay3rzwqFV8P4efTrK4CZhQle3M/QwLPjISghfcolmEGAPWxuJi6m98ZEfk4VR4Lfg=="
4545
},
4646
"Microsoft.TestPlatform.ObjectModel": {
4747
"type": "Transitive",
48-
"resolved": "17.12.0",
49-
"contentHash": "TDqkTKLfQuAaPcEb3pDDWnh7b3SyZF+/W9OZvWFp6eJCIiiYFdSB6taE2I6tWrFw5ywhzOb6sreoGJTI6m3rSQ==",
48+
"resolved": "17.13.0",
49+
"contentHash": "bt0E0Dx+iqW97o4A59RCmUmz/5NarJ7LRL+jXbSHod72ibL5XdNm1Ke+UO5tFhBG4VwHLcSjqq9BUSblGNWamw==",
5050
"dependencies": {
5151
"System.Reflection.Metadata": "1.6.0"
5252
}
5353
},
5454
"Microsoft.TestPlatform.TestHost": {
5555
"type": "Transitive",
56-
"resolved": "17.12.0",
57-
"contentHash": "MiPEJQNyADfwZ4pJNpQex+t9/jOClBGMiCiVVFuELCMSX2nmNfvUor3uFVxNNCg30uxDP8JDYfPnMXQzsfzYyg==",
56+
"resolved": "17.13.0",
57+
"contentHash": "9GGw08Dc3AXspjekdyTdZ/wYWFlxbgcF0s7BKxzVX+hzAwpifDOdxM+ceVaaJSQOwqt3jtuNlHn3XTpKUS9x9Q==",
5858
"dependencies": {
59-
"Microsoft.TestPlatform.ObjectModel": "17.12.0",
59+
"Microsoft.TestPlatform.ObjectModel": "17.13.0",
6060
"Newtonsoft.Json": "13.0.1"
6161
}
6262
},

integrationtest/TargetProjects/NetCore/Library.FSharp.XUnit/Library.FSharp.XUnit.fsproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</ItemGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
17+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
1818
<PackageReference Include="xunit" Version="2.9.3" />
1919
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
2020
</ItemGroup>

integrationtest/TargetProjects/NetCore/Library.FSharp.XUnit/packages.lock.json

+16-16
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
"net6.0": {
55
"FSharp.Core": {
66
"type": "Direct",
7-
"requested": "[9.0.101, )",
8-
"resolved": "9.0.101",
9-
"contentHash": "3/YR1SDWFA+Ojx9HiBwND+0UR8ZWoeZfkhD0DWAPCDdr/YI+CyFkArmMGzGSyPXeYtjG0sy0emzfyNwjt7zhig=="
7+
"requested": "[9.0.201, )",
8+
"resolved": "9.0.201",
9+
"contentHash": "Ozq4T0ISTkqTYJ035XW/JkdDDaXofbykvfyVwkjLSqaDZ/4uNXfpf92cjcMI9lf9CxWqmlWHScViPh/4AvnWcw=="
1010
},
1111
"Microsoft.NET.Test.Sdk": {
1212
"type": "Direct",
13-
"requested": "[17.12.0, )",
14-
"resolved": "17.12.0",
15-
"contentHash": "kt/PKBZ91rFCWxVIJZSgVLk+YR+4KxTuHf799ho8WNiK5ZQpJNAEZCAWX86vcKrs+DiYjiibpYKdGZP6+/N17w==",
13+
"requested": "[17.13.0, )",
14+
"resolved": "17.13.0",
15+
"contentHash": "W19wCPizaIC9Zh47w8wWI/yxuqR7/dtABwOrc8r2jX/8mUNxM2vw4fXDh+DJTeogxV+KzKwg5jNNGQVwf3LXyA==",
1616
"dependencies": {
17-
"Microsoft.CodeCoverage": "17.12.0",
18-
"Microsoft.TestPlatform.TestHost": "17.12.0"
17+
"Microsoft.CodeCoverage": "17.13.0",
18+
"Microsoft.TestPlatform.TestHost": "17.13.0"
1919
}
2020
},
2121
"xunit": {
@@ -37,23 +37,23 @@
3737
},
3838
"Microsoft.CodeCoverage": {
3939
"type": "Transitive",
40-
"resolved": "17.12.0",
41-
"contentHash": "4svMznBd5JM21JIG2xZKGNanAHNXplxf/kQDFfLHXQ3OnpJkayRK/TjacFjA+EYmoyuNXHo/sOETEfcYtAzIrA=="
40+
"resolved": "17.13.0",
41+
"contentHash": "9LIUy0y+DvUmEPtbRDw6Bay3rzwqFV8P4efTrK4CZhQle3M/QwLPjISghfcolmEGAPWxuJi6m98ZEfk4VR4Lfg=="
4242
},
4343
"Microsoft.TestPlatform.ObjectModel": {
4444
"type": "Transitive",
45-
"resolved": "17.12.0",
46-
"contentHash": "TDqkTKLfQuAaPcEb3pDDWnh7b3SyZF+/W9OZvWFp6eJCIiiYFdSB6taE2I6tWrFw5ywhzOb6sreoGJTI6m3rSQ==",
45+
"resolved": "17.13.0",
46+
"contentHash": "bt0E0Dx+iqW97o4A59RCmUmz/5NarJ7LRL+jXbSHod72ibL5XdNm1Ke+UO5tFhBG4VwHLcSjqq9BUSblGNWamw==",
4747
"dependencies": {
4848
"System.Reflection.Metadata": "1.6.0"
4949
}
5050
},
5151
"Microsoft.TestPlatform.TestHost": {
5252
"type": "Transitive",
53-
"resolved": "17.12.0",
54-
"contentHash": "MiPEJQNyADfwZ4pJNpQex+t9/jOClBGMiCiVVFuELCMSX2nmNfvUor3uFVxNNCg30uxDP8JDYfPnMXQzsfzYyg==",
53+
"resolved": "17.13.0",
54+
"contentHash": "9GGw08Dc3AXspjekdyTdZ/wYWFlxbgcF0s7BKxzVX+hzAwpifDOdxM+ceVaaJSQOwqt3jtuNlHn3XTpKUS9x9Q==",
5555
"dependencies": {
56-
"Microsoft.TestPlatform.ObjectModel": "17.12.0",
56+
"Microsoft.TestPlatform.ObjectModel": "17.13.0",
5757
"Newtonsoft.Json": "13.0.1"
5858
}
5959
},
@@ -110,7 +110,7 @@
110110
"library.fsharp": {
111111
"type": "Project",
112112
"dependencies": {
113-
"FSharp.Core": "[9.0.101, )"
113+
"FSharp.Core": "[9.0.201, )"
114114
}
115115
}
116116
}

0 commit comments

Comments
 (0)