Skip to content

Commit a7e5786

Browse files
Run storage tests by creating a temporary solution containing only .NET 8 projects.
1 parent acb56fe commit a7e5786

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/External-Storage-Tests.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ jobs:
1717
GIT_REF: ${{ github.ref }}
1818
GIT_SHA: ${{ github.sha }}
1919
Configuration: Release
20-
SolutionFile: dotnet\DotNetStandardClasses.sln
20+
SolutionFile: dotnet\StorageTestSolution.sln
21+
SolutionFileName: StorageTestSolution
2122

2223
runs-on: ubuntu-latest
2324
environment: external-storage-tests
@@ -52,6 +53,11 @@ jobs:
5253
dotnet-version: '8.x'
5354
include-prerelease: true
5455

56+
- name: Create temporal solution with .NET 8 projects
57+
run: |
58+
dotnet new sln --name $SolutionFileName --output dotnet --force
59+
dotnet msbuild dotnet\DotNetStandardClasses.sln /t:DumpProjectsAndTests -p:DumpSolutionName=$SolutionFileName /m:1 -p:DumpSolutionTargetFrameworkDefault=net8
60+
5561
- name: Restore packages
5662
run: dotnet restore $SolutionFile
5763

dotnet/Directory.Build.targets

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
<Target Name="DumpProjects" Condition="($(TargetFramework.StartsWith($(DumpSolutionTargetFrameworkDefault))) OR $(TargetFrameworks.Contains($(DumpSolutionTargetFrameworkDefault))) ) AND !$(MSBuildProjectFullPath.Contains('\test\')) AND ('$(IsPublishable)'=='true' OR '$(IsPublishable)'=='')">
2727
<Exec Command="dotnet sln $(MSBuildThisFileDirectory)$(DumpSolutionName).sln add $(MSBuildProjectFullPath)"></Exec>
2828
</Target>
29+
30+
<Target Name="DumpProjectsAndTests" Condition="($(TargetFramework.StartsWith($(DumpSolutionTargetFrameworkDefault))) OR $(TargetFrameworks.Contains($(DumpSolutionTargetFrameworkDefault))) ) ">
31+
<Exec Command="dotnet sln $(MSBuildThisFileDirectory)$(DumpSolutionName).sln add $(MSBuildProjectFullPath)"></Exec>
32+
</Target>
2933

3034
<Target Name="PublishForAnalyzer">
3135
<Exec Command="dotnet publish $(MSBuildThisFileDirectory)$(DumpSolutionName).sln --configuration Debug -o $(MSBuildThisFileDirectory)..\.out -p:Publishing=true -p:SignAssembly=false --framework net8.0"></Exec>

0 commit comments

Comments
 (0)