Split tests for .net and old .netframework #356
Workflow file for this run
This file contains hidden or 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
| name: .NET Framework Windows | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build-and-test: | |
| runs-on: [windows-latest] | |
| strategy: | |
| matrix: | |
| # Test with .NET Framework | |
| # See https://learn.microsoft.com/en-us/lifecycle/products/microsoft-net-framework | |
| # For active versions | |
| include: | |
| - net-version: v4.6.2 | |
| framework: net462 | |
| - net-version: v4.8.0 | |
| framework: net480 | |
| - net-version: v4.8.1 | |
| framework: net481 | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET 10 SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Setup MSBuild | |
| uses: microsoft/setup-msbuild@v1.1 | |
| - name: Setup VSTest | |
| uses: darenm/Setup-VSTest@v1.2 | |
| - name: Pack nuget | |
| run: | | |
| msbuild -restore -t:clean,rebuild,pack -p:Configuration=Release | |
| copy src\bin\Release\*.nupkg NetFrameworkTests | |
| - name: Build test project | |
| run: msbuild NetFrameworkTests\Aspose.BarCode.Cloud.Sdk.NetFrameworkTests.csproj -restore -p:Configuration=Release | |
| - name: Test with VSTest | |
| run: | | |
| $ErrorActionPreference = "Stop" | |
| VSTest.Console.exe /Framework:".NETFramework,Version=${{ matrix.net-version }}" /ResultsDirectory:NetFrameworkTests\Results /Logger:"trx;LogFileName=test.log" NetFrameworkTests\bin\Release\${{ matrix.framework }}\Aspose.BarCode.Cloud.Sdk.NetFrameworkTests.dll | |
| if( ([xml](Get-Content NetFrameworkTests\Results\test.log)).TestRun.ResultSummary.Counters.total -ne 21 ){ throw "Not all tests were explored or added new tests" } | |
| env: | |
| TEST_CONFIGURATION_JWT_TOKEN: ${{ secrets.TEST_CONFIGURATION_ACCESS_TOKEN }} |