-
Notifications
You must be signed in to change notification settings - Fork 469
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #323 from icsharpcode/update-unit-tests
Fix unit testing for netcore3.1 and net6.0 targets.
- Loading branch information
Showing
4 changed files
with
52 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,28 +26,70 @@ jobs: | |
version: ${{ env.BuildVersion }}.${{ github.run_number }} | ||
assemblyVersion: ${{ env.BuildVersion }}.${{ github.run_number }} | ||
fileVersion: ${{ env.BuildVersion }}.${{ github.run_number }} | ||
|
||
- name: Setup .NET 3.1 (for unit tests only) | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 3.1.x | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Setup NuGet.exe | ||
uses: nuget/setup-nuget@v1 | ||
- run: nuget restore ICSharpCode.AvalonEdit.sln | ||
|
||
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
|
||
- run: msbuild ICSharpCode.AvalonEdit.sln /t:Restore /p:Configuration=${{ matrix.configuration }} | ||
|
||
- name: Build | ||
run: dotnet build ICSharpCode.AvalonEdit.sln --no-restore -c ${{ matrix.configuration }} | ||
- name: Test | ||
run: dotnet test ICSharpCode.AvalonEdit.sln --no-build --verbosity normal -c ${{ matrix.configuration }} | ||
run: msbuild ICSharpCode.AvalonEdit.sln /p:Configuration=${{ matrix.configuration }} | ||
|
||
- name: Setup VSTest | ||
uses: Malcolmnixon/Setup-VSTest@v4 | ||
|
||
- name: net6.0-windows Unit Tests | ||
run: vstest.console $env:TestAssembly | ||
env: | ||
TestAssembly: ICSharpCode.AvalonEdit.Tests\bin\${{ matrix.configuration }}\net6.0-windows\ICSharpCode.AvalonEdit.Tests.dll | ||
|
||
- name: netcoreapp3.1 Unit Tests | ||
run: vstest.console $env:TestAssembly | ||
env: | ||
TestAssembly: ICSharpCode.AvalonEdit.Tests\bin\${{ matrix.configuration }}\netcoreapp3.1\ICSharpCode.AvalonEdit.Tests.dll | ||
|
||
- name: net45 Unit Tests | ||
run: vstest.console $env:TestAssembly | ||
env: | ||
TestAssembly: ICSharpCode.AvalonEdit.Tests\bin\${{ matrix.configuration }}\net45\ICSharpCode.AvalonEdit.Tests.dll | ||
|
||
- name: net40 Unit Tests | ||
run: vstest.console $env:TestAssembly | ||
env: | ||
TestAssembly: ICSharpCode.AvalonEdit.Tests\bin\${{ matrix.configuration }}\net40\ICSharpCode.AvalonEdit.Tests.dll | ||
|
||
- name: Style - tab check | ||
run: python BuildTools\tidy.py | ||
|
||
- name: Pack | ||
run: dotnet pack ICSharpCode.AvalonEdit/ICSharpCode.AvalonEdit.csproj -c ${{ matrix.configuration }} | ||
run: dotnet pack ICSharpCode.AvalonEdit/ICSharpCode.AvalonEdit.csproj -c ${{ matrix.configuration }} | ||
|
||
- name: Upload NuGet | ||
if: matrix.configuration == 'release' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: AvalonEdit NuGet Package (${{ matrix.configuration }}) | ||
path: ICSharpCode.AvalonEdit/bin/Release/AvalonEdit*.nupkg | ||
if-no-files-found: error | ||
|
||
- name: Upload Snupkg Artifact | ||
if: matrix.configuration == 'release' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: AvalonEdit Snupkg (${{ matrix.configuration }}) | ||
path: ICSharpCode.AvalonEdit/bin/Release/AvalonEdit*.snupkg | ||
if-no-files-found: error | ||
|
||
- name: Publish NuGet | ||
if: github.ref == 'refs/heads/master' && matrix.configuration == 'release' | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters