@@ -26,28 +26,70 @@ jobs:
26
26
version : ${{ env.BuildVersion }}.${{ github.run_number }}
27
27
assemblyVersion : ${{ env.BuildVersion }}.${{ github.run_number }}
28
28
fileVersion : ${{ env.BuildVersion }}.${{ github.run_number }}
29
+
30
+ - name : Setup .NET 3.1 (for unit tests only)
31
+ uses : actions/setup-dotnet@v1
32
+ with :
33
+ dotnet-version : 3.1.x
34
+
29
35
- name : Setup .NET
30
36
uses : actions/setup-dotnet@v1
31
37
with :
32
38
dotnet-version : 6.0.x
33
- - name : Setup NuGet.exe
34
- uses : nuget/setup-nuget@v1
35
- - run : nuget restore ICSharpCode.AvalonEdit.sln
39
+
40
+ - name : Add msbuild to PATH
41
+
42
+
43
+ - run : msbuild ICSharpCode.AvalonEdit.sln /t:Restore /p:Configuration=${{ matrix.configuration }}
44
+
36
45
- name : Build
37
- run : dotnet build ICSharpCode.AvalonEdit.sln --no-restore -c ${{ matrix.configuration }}
38
- - name : Test
39
- run : dotnet test ICSharpCode.AvalonEdit.sln --no-build --verbosity normal -c ${{ matrix.configuration }}
46
+ run : msbuild ICSharpCode.AvalonEdit.sln /p:Configuration=${{ matrix.configuration }}
47
+
48
+ - name : Setup VSTest
49
+ uses : Malcolmnixon/Setup-VSTest@v4
50
+
51
+ - name : net6.0-windows Unit Tests
52
+ run : vstest.console $env:TestAssembly
53
+ env :
54
+ TestAssembly : ICSharpCode.AvalonEdit.Tests\bin\${{ matrix.configuration }}\net6.0-windows\ICSharpCode.AvalonEdit.Tests.dll
55
+
56
+ - name : netcoreapp3.1 Unit Tests
57
+ run : vstest.console $env:TestAssembly
58
+ env :
59
+ TestAssembly : ICSharpCode.AvalonEdit.Tests\bin\${{ matrix.configuration }}\netcoreapp3.1\ICSharpCode.AvalonEdit.Tests.dll
60
+
61
+ - name : net45 Unit Tests
62
+ run : vstest.console $env:TestAssembly
63
+ env :
64
+ TestAssembly : ICSharpCode.AvalonEdit.Tests\bin\${{ matrix.configuration }}\net45\ICSharpCode.AvalonEdit.Tests.dll
65
+
66
+ - name : net40 Unit Tests
67
+ run : vstest.console $env:TestAssembly
68
+ env :
69
+ TestAssembly : ICSharpCode.AvalonEdit.Tests\bin\${{ matrix.configuration }}\net40\ICSharpCode.AvalonEdit.Tests.dll
70
+
40
71
- name : Style - tab check
41
72
run : python BuildTools\tidy.py
73
+
42
74
- name : Pack
43
- run : dotnet pack ICSharpCode.AvalonEdit/ICSharpCode.AvalonEdit.csproj -c ${{ matrix.configuration }}
75
+ run : dotnet pack ICSharpCode.AvalonEdit/ICSharpCode.AvalonEdit.csproj -c ${{ matrix.configuration }}
76
+
44
77
- name : Upload NuGet
45
78
if : matrix.configuration == 'release'
46
79
uses : actions/upload-artifact@v2
47
80
with :
48
81
name : AvalonEdit NuGet Package (${{ matrix.configuration }})
49
82
path : ICSharpCode.AvalonEdit/bin/Release/AvalonEdit*.nupkg
50
83
if-no-files-found : error
84
+
85
+ - name : Upload Snupkg Artifact
86
+ if : matrix.configuration == 'release'
87
+ uses : actions/upload-artifact@v2
88
+ with :
89
+ name : AvalonEdit Snupkg (${{ matrix.configuration }})
90
+ path : ICSharpCode.AvalonEdit/bin/Release/AvalonEdit*.snupkg
91
+ if-no-files-found : error
92
+
51
93
- name : Publish NuGet
52
94
if : github.ref == 'refs/heads/master' && matrix.configuration == 'release'
53
95
run : |
0 commit comments