ci-tests.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. name: Tests
  2. on:
  3. push:
  4. branches:
  5. - master
  6. # Run tests against the forked branch, but
  7. # do not allow access to secrets
  8. # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflows-in-forked-repositories
  9. pull_request:
  10. env:
  11. SDK_VERSION: "9.0.x"
  12. jobs:
  13. run-tests:
  14. strategy:
  15. matrix:
  16. os: ["ubuntu-latest", "macos-latest", "windows-latest"]
  17. runs-on: "${{ matrix.os }}"
  18. steps:
  19. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  20. - uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
  21. with:
  22. dotnet-version: ${{ env.SDK_VERSION }}
  23. - name: Run DotNet CLI Tests
  24. run: >
  25. dotnet test Jellyfin.sln
  26. --configuration Release
  27. --collect:"XPlat Code Coverage"
  28. --settings tests/coverletArgs.runsettings
  29. --verbosity minimal
  30. - name: Merge code coverage results
  31. uses: danielpalme/ReportGenerator-GitHub-Action@810356ce07a94200154301fb73d878e327b2dd58 # v5.4.1
  32. with:
  33. reports: "**/coverage.cobertura.xml"
  34. targetdir: "merged/"
  35. reporttypes: "Cobertura"
  36. # TODO - which action / tool to use to publish code coverage results?
  37. # - name: Publish code coverage results