Pass CT to perf refresh; guard dispose #66
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: Motus CI | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "src/**" | |
| - "tests/**" | |
| - "samples/**" | |
| - "Motus.sln" | |
| - ".github/workflows/motus-ci.yml" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "src/**" | |
| - "tests/**" | |
| - "samples/**" | |
| - "Motus.sln" | |
| - ".github/workflows/motus-ci.yml" | |
| jobs: | |
| dotnet: | |
| name: .NET (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Restore | |
| run: dotnet restore Motus.sln | |
| - name: Build | |
| run: dotnet build Motus.sln --configuration Release --no-restore | |
| - name: Test (unit) | |
| run: >- | |
| dotnet test Motus.sln | |
| --configuration Release | |
| --no-build | |
| --filter "TestCategory!=Integration" | |
| --logger "trx;LogFilePrefix=results" | |
| --collect:"XPlat Code Coverage" | |
| --results-directory TestResults | |
| --settings coverage.runsettings | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-${{ matrix.os }} | |
| path: TestResults/**/*.trx | |
| retention-days: 14 | |
| - name: Install ReportGenerator | |
| if: matrix.os == 'ubuntu-latest' | |
| run: dotnet tool install --global dotnet-reportgenerator-globaltool | |
| - name: Generate coverage report | |
| if: matrix.os == 'ubuntu-latest' | |
| run: >- | |
| reportgenerator | |
| -reports:"TestResults/**/coverage.cobertura.xml" | |
| -targetdir:"TestResults/CoverageReport" | |
| -reporttypes:"Html;Cobertura;MarkdownSummaryGithub" | |
| - name: Upload coverage report | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: TestResults/CoverageReport | |
| retention-days: 14 | |
| - name: Post coverage summary | |
| if: matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request' | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| with: | |
| path: TestResults/CoverageReport/SummaryGithub.md | |
| integration: | |
| name: Integration Tests (Chrome) | |
| runs-on: ubuntu-latest | |
| needs: dotnet | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 10.0.x | |
| - name: Install Chrome | |
| uses: browser-actions/setup-chrome@v1 | |
| with: | |
| chrome-version: stable | |
| - name: Build | |
| run: dotnet build Motus.sln --configuration Release | |
| - name: Test (integration - Chrome) | |
| timeout-minutes: 10 | |
| run: >- | |
| dotnet test Motus.sln | |
| --configuration Release | |
| --no-build | |
| --filter "TestCategory=Integration&TestCategory!=Firefox" | |
| --logger "trx;LogFileName=integration-results.trx" | |
| --results-directory TestResults | |
| - name: Upload integration test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: integration-test-results | |
| path: TestResults/**/*.trx | |
| retention-days: 14 | |
| - name: Generate Motus reports | |
| if: always() | |
| timeout-minutes: 5 | |
| run: >- | |
| dotnet run --project src/Motus.Cli/Motus.Cli.csproj --configuration Release --framework net10.0 --no-build -- | |
| run samples/Motus.Samples/bin/Release/net8.0/Motus.Samples.dll | |
| --reporter console | |
| --reporter junit:TestResults/motus-junit.xml | |
| --reporter html:TestResults/motus-report.html | |
| --reporter trx:TestResults/motus-results.trx | |
| - name: Upload Motus reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: motus-reports | |
| path: | | |
| TestResults/motus-junit.xml | |
| TestResults/motus-report.html | |
| TestResults/motus-results.trx | |
| retention-days: 14 | |
| integration-firefox: | |
| name: Integration Tests (Firefox) | |
| runs-on: ubuntu-latest | |
| needs: dotnet | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Install Firefox | |
| uses: browser-actions/setup-firefox@v1 | |
| with: | |
| firefox-version: latest | |
| - name: Build | |
| run: dotnet build Motus.sln --configuration Release | |
| - name: Test (integration - Firefox) | |
| run: >- | |
| dotnet test Motus.sln | |
| --configuration Release | |
| --no-build | |
| --filter "TestCategory=Integration&TestCategory=Firefox" | |
| --logger "trx;LogFileName=firefox-integration-results.trx" | |
| --results-directory TestResults | |
| - name: Upload Firefox integration test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: firefox-integration-test-results | |
| path: TestResults/**/*.trx | |
| retention-days: 14 | |
| # nuget-validate: | |
| # name: NuGet Validation | |
| # runs-on: ubuntu-latest | |
| # needs: dotnet | |
| # | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # | |
| # - name: Setup .NET | |
| # uses: actions/setup-dotnet@v4 | |
| # with: | |
| # dotnet-version: 10.0.x | |
| # | |
| # - name: Build | |
| # run: dotnet build Motus.sln -c Release | |
| # | |
| # - name: Pack NuGet packages | |
| # run: | | |
| # dotnet pack src/Motus.Abstractions/Motus.Abstractions.csproj -c Release --no-build -o packages | |
| # dotnet pack src/Motus/Motus.csproj -c Release --no-build -o packages | |
| # | |
| # - name: Validate packages | |
| # run: | | |
| # for pkg in packages/*.nupkg; do | |
| # echo "Validating $pkg..." | |
| # dotnet nuget verify "$pkg" --all 2>/dev/null || echo " (signature verification skipped — package is unsigned)" | |
| # unzip -t "$pkg" > /dev/null | |
| # echo " OK" | |
| # done | |
| # | |
| # - name: Upload NuGet packages | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: nuget-packages | |
| # path: packages/*.nupkg |