fix: 等待时间下限不一致 #79
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
on: | |
push: | |
paths: | |
- "**.cs" | |
pull_request: | |
paths: | |
- "**.cs" | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Install .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6.0.x | |
- name: Run tests | |
if: github.event_name == 'pull_request' | |
run: | |
dotnet test src/Serein.Tests --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true" | |
- name: Generate coverage | |
id: coverage | |
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (failure() || success()) | |
run: | | |
dotnet tool install --global JetBrains.dotCover.CommandLineTools | |
dotnet dotcover cover-dotnet --Output=AppCoverageReport.xml --ReportType=DetailedXML -- test --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true" | |
- name: Run codacy-coverage-reporter | |
if: steps.coverage.conclusion != 'skipped' && (failure() || success()) | |
uses: codacy/[email protected] | |
with: | |
api-token: ${{ secrets.CODACY_API_TOKEN }} | |
coverage-reports: AppCoverageReport.xml | |