Migrate tests to MSTest and fix COM IIDs (#6) #26
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
| # This workflow will build a .NET project | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
| name: .NET | |
| on: | |
| pull_request: | |
| branches: [ "main" ] | |
| push: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| name: ".NET / build" | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '10.0.x' | |
| dotnet-quality: 'preview' | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore | |
| - name: Build release | |
| run: dotnet build --configuration Release --no-restore | |
| - name: Test | |
| run: | | |
| $resultsDir = Join-Path $PWD.Path 'artifacts/test-results/debug' | |
| New-Item -ItemType Directory -Force -Path $resultsDir | Out-Null | |
| dotnet test --project vsinterop.tests/vsinterop.tests.csproj --no-build ` | |
| --results-directory "$resultsDir" ` | |
| --report-trx ` | |
| --output Detailed | |
| - name: Test release | |
| run: | | |
| $resultsDir = Join-Path $PWD.Path 'artifacts/test-results/release' | |
| New-Item -ItemType Directory -Force -Path $resultsDir | Out-Null | |
| dotnet test --project vsinterop.tests/vsinterop.tests.csproj -c Release --no-build ` | |
| --results-directory "$resultsDir" ` | |
| --report-trx ` | |
| --output Detailed | |
| - name: Upload raw logs | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mtp-logs | |
| path: | | |
| artifacts/test-results/**/*.trx | |
| if-no-files-found: warn | |
| retention-days: 14 |