Skip to content

[*] fix: PoolRuntimeDuration may return negative number in some case #465

[*] fix: PoolRuntimeDuration may return negative number in some case

[*] fix: PoolRuntimeDuration may return negative number in some case #465

Workflow file for this run

name: test
permissions:
statuses: write
checks: write
contents: write
pull-requests: write
actions: write
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore PowerThreadPool/PowerThreadPool.csproj
- name: Build
run: dotnet build PowerThreadPool/PowerThreadPool.csproj --no-restore
tests-and-reports:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Run Tests and Generate TRX Report
run: dotnet test UnitTest/UnitTest.csproj --logger "trx;LogFileName=test-results.trx" --collect:"XPlat Code Coverage"
- name: Publish Unit Test Results
uses: dorny/test-reporter@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: 'Unit Test Results'
reporter: 'dotnet-trx'
path: '**/test-results.trx'
fail_on_error: false
- name: Install ReportGenerator tool
run: dotnet tool install --global dotnet-reportgenerator-globaltool
- name: Create reports
run: reportgenerator "-reports:**/coverage.cobertura.xml" "-targetdir:coverage" -reporttypes:"HtmlInline_AzurePipelines;Cobertura"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: '**/coverage.cobertura.xml'