integration-tests.yml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. name: Build & Run Integration Tests
  2. on:
  3. push:
  4. branches: [ v2_release, v2_develop ]
  5. paths-ignore:
  6. - '**.md'
  7. pull_request:
  8. branches: [ v2_release, v2_develop ]
  9. paths-ignore:
  10. - '**.md'
  11. jobs:
  12. build:
  13. uses: ./.github/workflows/quick-build.yml
  14. integration_tests:
  15. name: Integration Tests
  16. runs-on: ${{ matrix.os }}
  17. needs: build
  18. strategy:
  19. fail-fast: false # Let all OSes finish even if one fails
  20. matrix:
  21. os: [ ubuntu-latest, windows-latest, macos-latest ]
  22. timeout-minutes: 15
  23. steps:
  24. - name: Checkout code
  25. uses: actions/checkout@v4
  26. - name: Setup .NET Core
  27. uses: actions/setup-dotnet@v4
  28. with:
  29. dotnet-version: 8.x
  30. dotnet-quality: ga
  31. - name: Download build artifacts
  32. uses: actions/download-artifact@v4
  33. with:
  34. name: test-build-artifacts
  35. path: .
  36. - name: Restore NuGet packages
  37. run: dotnet restore
  38. - name: Disable Windows Defender (Windows only)
  39. if: runner.os == 'Windows'
  40. shell: powershell
  41. run: |
  42. Add-MpPreference -ExclusionPath "${{ github.workspace }}"
  43. Add-MpPreference -ExclusionProcess "dotnet.exe"
  44. Add-MpPreference -ExclusionProcess "testhost.exe"
  45. Add-MpPreference -ExclusionProcess "VSTest.Console.exe"
  46. - name: Set VSTEST_DUMP_PATH
  47. shell: bash
  48. run: echo "VSTEST_DUMP_PATH=logs/IntegrationTests/${{ runner.os }}/" >> $GITHUB_ENV
  49. - name: Run IntegrationTests
  50. shell: bash
  51. run: |
  52. if [ "${{ runner.os }}" == "Linux" ]; then
  53. # Run with coverage on Linux only
  54. dotnet test Tests/IntegrationTests \
  55. --no-build \
  56. --verbosity minimal \
  57. --collect:"XPlat Code Coverage" \
  58. --settings Tests/IntegrationTests/runsettings.coverage.xml \
  59. --diag:logs/IntegrationTests/${{ runner.os }}/logs.txt \
  60. --blame \
  61. --blame-crash \
  62. --blame-hang \
  63. --blame-hang-timeout 60s \
  64. --blame-crash-collect-always
  65. else
  66. # Run without coverage on Windows/macOS for speed
  67. dotnet test Tests/IntegrationTests \
  68. --no-build \
  69. --verbosity minimal \
  70. --settings Tests/IntegrationTests/runsettings.xml \
  71. --diag:logs/IntegrationTests/${{ runner.os }}/logs.txt \
  72. --blame \
  73. --blame-crash \
  74. --blame-hang \
  75. --blame-hang-timeout 60s \
  76. --blame-crash-collect-always
  77. fi
  78. - name: Upload Integration Test Logs
  79. if: always()
  80. uses: actions/upload-artifact@v4
  81. with:
  82. name: integration_tests-logs-${{ runner.os }}
  83. path: |
  84. logs/IntegrationTests/
  85. TestResults/
  86. - name: Upload Integration Tests Coverage to Codecov
  87. if: matrix.os == 'ubuntu-latest' && always()
  88. uses: codecov/codecov-action@v4
  89. with:
  90. files: TestResults/**/coverage.cobertura.xml
  91. flags: integrationtests
  92. name: IntegrationTests-${{ runner.os }}
  93. token: ${{ secrets.CODECOV_TOKEN }}
  94. fail_ci_if_error: false