Add macOS CI job, fix Cleanup hang on macOS, and add regression test #361
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: CI | |
| on: [push, pull_request] | |
| jobs: | |
| ununtu: | |
| runs-on: ubuntu-latest | |
| env: | |
| DOTNET_NOLOGO: true | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.0.x | |
| - run: dotnet restore src/NetMQ.sln | |
| - name: build | |
| run: dotnet build src/NetMQ.sln /p:Configuration=Release /verbosity:minimal | |
| - name: test net10.0 | |
| run: dotnet test -v n -p:ParallelizeTestCollections=false --configuration Release --no-build -f net10.0 src/NetMQ.Tests/NetMQ.Tests.csproj | |
| macos: | |
| runs-on: macos-latest | |
| permissions: | |
| contents: read | |
| env: | |
| DOTNET_NOLOGO: true | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.0.x | |
| - run: dotnet restore src/NetMQ.sln | |
| - name: build | |
| run: dotnet build src/NetMQ.sln /p:Configuration=Release /verbosity:minimal | |
| - name: test net10.0 | |
| timeout-minutes: 10 | |
| run: >- | |
| dotnet test -v n -p:ParallelizeTestCollections=false | |
| --configuration Release --no-build -f net10.0 | |
| --blame-hang --blame-hang-timeout 90s --blame-hang-dump-type none | |
| --filter "Category!=Beacon" | |
| --results-directory TestResults | |
| src/NetMQ.Tests/NetMQ.Tests.csproj | |
| - name: upload hang diagnostics | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macOS-blame-hang | |
| path: TestResults/ | |
| windows: | |
| runs-on: windows-latest | |
| env: | |
| DOTNET_NOLOGO: true | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Install codecov | |
| run: | | |
| choco install opencover.portable | |
| choco install codecov | |
| - run: dotnet restore src/NetMQ.sln | |
| - name: build | |
| run: dotnet build src/NetMQ.sln /p:Configuration=Release /verbosity:minimal | |
| - name: test net10.0 | |
| run: dotnet test -v n -p:ParallelizeTestCollections=false --configuration Release --no-build -f net10.0 src\NetMQ.Tests\NetMQ.Tests.csproj | |
| - name: test net472 | |
| run: dotnet test -v n -p:ParallelizeTestCollections=false --configuration Release --no-build -f net472 src\NetMQ.Tests\NetMQ.Tests.csproj | |
| - name: coverage | |
| run: | | |
| OpenCover.Console.exe -register:user -target:"C:\Program Files\dotnet\dotnet.exe" -targetargs:"test --no-build --configuration Release -f net10.0 --logger:trx;LogFileName=results.trx /p:DebugType=full src\NetMQ.Tests\NetMQ.Tests.csproj" -filter:"+[NetMQ*]* -[NetMQ.Tests*]*" -output:".\NetMQ_coverage.xml" -oldStyle | |
| codecov -f "NetMQ_coverage.xml" |