dotnet-core.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. name: .NET Core
  2. on:
  3. push:
  4. branches: [ v1_release, v1_develop ]
  5. paths-ignore:
  6. - '**.md'
  7. pull_request:
  8. branches: [ v1_release, v1_develop ]
  9. paths-ignore:
  10. - '**.md'
  11. jobs:
  12. non_parallel_unittests:
  13. name: Non-Parallel Unit Tests
  14. runs-on: ${{ matrix.os }}
  15. strategy:
  16. # Turn off fail-fast to let all runners run even if there are errors
  17. fail-fast: true
  18. matrix:
  19. os: [ ubuntu-latest ]
  20. timeout-minutes: 10
  21. steps:
  22. - name: Checkout code
  23. uses: actions/checkout@v4
  24. - name: Setup .NET Core
  25. uses: actions/setup-dotnet@v4
  26. with:
  27. dotnet-version: 8.x
  28. dotnet-quality: 'ga'
  29. - name: Install dependencies
  30. run: |
  31. dotnet restore
  32. - name: Build Solution Debug
  33. run: dotnet build --configuration Debug --no-restore
  34. - name: Test
  35. run: |
  36. #sed -i 's/"stopOnFail": false/"stopOnFail": true/g' UnitTests/xunit.runner.json
  37. dotnet test --no-restore --verbosity normal
  38. #--collect:"XPlat Code Coverage" --settings UnitTests/coverlet.runsettings
  39. #mv -v UnitTests/TestResults/*/*.* UnitTests/TestResults/
  40. # Note: this step is currently not writing to the gist for some reason
  41. # - name: Create Test Coverage Badge
  42. # uses: simon-k/[email protected]
  43. # id: create_coverage_badge
  44. # with:
  45. # label: Unit Test Coverage
  46. # color: brightgreen
  47. # path: UnitTests/TestResults/coverage.opencover.xml
  48. # gist-filename: code-coverage.json
  49. # # https://gist.github.com/migueldeicaza/90ef67a684cb71db1817921a970f8d27
  50. # gist-id: 90ef67a684cb71db1817921a970f8d27
  51. # gist-auth-token: ${{ secrets.GIST_AUTH_TOKEN }}
  52. # - name: Print Code Coverage
  53. # run: |
  54. # echo "Code coverage percentage: ${{steps.create_coverage_badge.outputs.percentage}}%"
  55. # echo "Badge data: ${{steps.create_coverage_badge.outputs.badge}}"