@@ -79,64 +79,64 @@ jobs:
79
79
echo "-p version=$BuildVersion" | out-file NuGet\metadata.txt -Append
80
80
}
81
81
82
- echo ' -p " commit=$env:GITHUB_SHA"' | out-file NuGet\metadata.txt -Append
82
+ echo " -p commit=$env:GITHUB_SHA" | out-file NuGet\metadata.txt -Append
83
83
84
- - name : 执行单元测试
85
- if : contains(github.ref, 'tags/') != 'true'
86
- working-directory : ${{env.GITHUB_WORKSPACE}}
87
- shell : pwsh
88
- run : |
89
- # Procdump工具,用于单元测试崩溃诊断
90
- Invoke-WebRequest -Uri https://download.sysinternals.com/files/Procdump.zip -OutFile Bin\Procdump.zip
91
- &7z e Bin\Procdump.zip "-o$Env:GITHUB_WORKSPACE\Bin"
84
+ # - name: 执行单元测试
85
+ # if: contains(github.ref, 'tags/') != 'true'
86
+ # working-directory: ${{env.GITHUB_WORKSPACE}}
87
+ # shell: pwsh
88
+ # run: |
89
+ # # Procdump工具,用于单元测试崩溃诊断
90
+ # Invoke-WebRequest -Uri https://download.sysinternals.com/files/Procdump.zip -OutFile Bin\Procdump.zip
91
+ # &7z e Bin\Procdump.zip "-o$Env:GITHUB_WORKSPACE\Bin"
92
92
93
- # MSBuild、PROCDUMP_PATH目录更新到 Path
94
- $Env:Path="$Env:GITHUB_WORKSPACE\Bin;${{env.MSBuildBinPath}};${{env.LatestVisualStudioRoot}}\Common7\IDE\CommonExtensions\Microsoft\TestWindow;" + $Env:Path
93
+ # # MSBuild、PROCDUMP_PATH目录更新到 Path
94
+ # $Env:Path="$Env:GITHUB_WORKSPACE\Bin;${{env.MSBuildBinPath}};${{env.LatestVisualStudioRoot}}\Common7\IDE\CommonExtensions\Microsoft\TestWindow;" + $Env:Path
95
95
96
- # 编译单元测试项目
97
- &msbuild UnitTest\UnitTest.vcxproj "-p:Configuration=Release;Platform=Win32;SolutionDir=$Env:GITHUB_WORKSPACE\\"
98
- if($lastexitcode -ne 0)
99
- {
100
- throw "UnitTest\UnitTest.vcxproj 编译失败!退出代码:$lastexitcode"
101
- }
96
+ # # 编译单元测试项目
97
+ # &msbuild UnitTest\UnitTest.vcxproj "-p:Configuration=Release;Platform=Win32;SolutionDir=$Env:GITHUB_WORKSPACE\\"
98
+ # if($lastexitcode -ne 0)
99
+ # {
100
+ # throw "UnitTest\UnitTest.vcxproj 编译失败!退出代码:$lastexitcode"
101
+ # }
102
102
103
- &msbuild UnitTest\UnitTest.vcxproj "-p:Configuration=Release;Platform=x64;SolutionDir=$Env:GITHUB_WORKSPACE\\"
104
- if($lastexitcode -ne 0)
105
- {
106
- throw "UnitTest\UnitTest.vcxproj 编译失败!退出代码:$lastexitcode"
107
- }
103
+ # &msbuild UnitTest\UnitTest.vcxproj "-p:Configuration=Release;Platform=x64;SolutionDir=$Env:GITHUB_WORKSPACE\\"
104
+ # if($lastexitcode -ne 0)
105
+ # {
106
+ # throw "UnitTest\UnitTest.vcxproj 编译失败!退出代码:$lastexitcode"
107
+ # }
108
108
109
- $RunFaild = 0
109
+ # $RunFaild = 0
110
110
111
- &vstest.console Release\UnitTest.dll "/logger:trx;LogFileName=UnitTestWin32.trx" "/Blame:CollectDump;CollectAlways=false;DumpType=full" "/Diag:TestResults\Win32.log"
112
- if($lastexitcode -ne 0)
113
- {
114
- $RunFaild = 1
115
- }
111
+ # &vstest.console Release\UnitTest.dll "/logger:trx;LogFileName=UnitTestWin32.trx" "/Blame:CollectDump;CollectAlways=false;DumpType=full" "/Diag:TestResults\Win32.log"
112
+ # if($lastexitcode -ne 0)
113
+ # {
114
+ # $RunFaild = 1
115
+ # }
116
116
117
- &vstest.console x64\Release\UnitTest.dll "/logger:trx;LogFileName=UnitTestWin64.trx" "/Blame:CollectDump;CollectAlways=false;DumpType=full" "/Diag:TestResults\Win64.log"
118
- if($lastexitcode -ne 0)
119
- {
120
- $RunFaild = 1
121
- }
117
+ # &vstest.console x64\Release\UnitTest.dll "/logger:trx;LogFileName=UnitTestWin64.trx" "/Blame:CollectDump;CollectAlways=false;DumpType=full" "/Diag:TestResults\Win64.log"
118
+ # if($lastexitcode -ne 0)
119
+ # {
120
+ # $RunFaild = 1
121
+ # }
122
122
123
- if($RunFaild -ne 0)
124
- {
125
- throw "单元测试失败!"
126
- }
127
- - uses : dorny/test-reporter@v1
128
- if : contains(fromJSON('["push", "create"]'), github.event_name) && contains(github.ref, 'tags/') != 'true' && (success() || failure())
129
- with :
130
- name : 单元测试报告
131
- path : TestResults/*.trx
132
- reporter : dotnet-trx
123
+ # if($RunFaild -ne 0)
124
+ # {
125
+ # throw "单元测试失败!"
126
+ # }
127
+ # - uses: dorny/test-reporter@v1
128
+ # if: contains(fromJSON('["push", "create"]'), github.event_name) && contains(github.ref, 'tags/') != 'true' && (success() || failure())
129
+ # with:
130
+ # name: 单元测试报告
131
+ # path: TestResults/*.trx
132
+ # reporter: dotnet-trx
133
133
134
134
- name : 文件打包
135
135
working-directory : ${{env.GITHUB_WORKSPACE}}
136
136
shell : cmd
137
137
run : |
138
138
::打包Nuget
139
- nuget pack NuGet\YY.Base.nuspec "@.\NuGet\metadata.txt"
139
+ nuget pack NuGet\YY.Base.nuspec -p "Channel=CI" "@.\NuGet\metadata.txt"
140
140
141
141
- uses : actions/upload-artifact@v4
142
142
with :
0 commit comments