Add AI command handler and display change reinit #51
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 CI/CD | |
| on: | |
| push: | |
| branches: [ master, main, develop ] | |
| pull_request: | |
| branches: [ master, main ] | |
| jobs: | |
| build-and-test: | |
| runs-on: windows-latest | |
| env: | |
| DESKTOPSHELL_PASSPHRASE: ${{ secrets.DESKTOPSHELL_PASSPHRASE }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: false | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore --configuration Release | |
| - name: Run tests with coverage | |
| run: dotnet test --configuration Release --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./TestResults | |
| - name: Debug - List all files | |
| shell: pwsh | |
| run: | | |
| Write-Output "=== Complete TestResults directory structure ===" | |
| Get-ChildItem -Path TestResults -Recurse | Format-Table FullName, Length -AutoSize | |
| - name: Install and Run ReportGenerator | |
| shell: pwsh | |
| run: | | |
| Write-Output "=== Installing ReportGenerator ===" | |
| dotnet tool install -g dotnet-reportgenerator-globaltool | |
| Write-Output "`n=== Finding coverage files ===" | |
| $coverageFiles = Get-ChildItem -Path TestResults -Filter "*.cobertura.xml" -Recurse | Select-Object -ExpandProperty FullName | |
| if ($coverageFiles.Count -eq 0) { | |
| Write-Output "ERROR: No coverage files found!" | |
| Write-Output "Trying alternative search..." | |
| $coverageFiles = Get-ChildItem -Path TestResults -Filter "*.xml" -Recurse | Select-Object -ExpandProperty FullName | |
| Write-Output "Found XML files:" | |
| $coverageFiles | ForEach-Object { Write-Output $_ } | |
| exit 1 | |
| } | |
| Write-Output "Found coverage files:" | |
| $coverageFiles | ForEach-Object { Write-Output $_ } | |
| Write-Output "`n=== Running ReportGenerator ===" | |
| $reportsParam = $coverageFiles -join ';' | |
| reportgenerator -reports:"$reportsParam" -targetdir:"coveragereport" -reporttypes:"Html;MarkdownSummaryGithub" | |
| - name: Add Coverage Comment to PR | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| if: github.event_name == 'pull_request' | |
| with: | |
| recreate: true | |
| path: coveragereport/SummaryGithub.md | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |