ci-tests.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. fail-fast: false
  18. runs-on: "${{ matrix.os }}"
  19. steps:
  20. - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
  21. - uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # v4.3.0
  22. with:
  23. dotnet-version: ${{ env.SDK_VERSION }}
  24. - name: Run DotNet CLI Tests
  25. run: >
  26. dotnet test Jellyfin.sln
  27. --configuration Release
  28. --collect:"XPlat Code Coverage"
  29. --settings tests/coverletArgs.runsettings
  30. --verbosity minimal
  31. - name: Merge code coverage results
  32. uses: danielpalme/ReportGenerator-GitHub-Action@c38c522d4b391c1b0da979cbb2e902c0a252a7dc # v5.4.3
  33. with:
  34. reports: "**/coverage.cobertura.xml"
  35. targetdir: "merged/"
  36. reporttypes: "Cobertura"
  37. # TODO - which action / tool to use to publish code coverage results?
  38. # - name: Publish code coverage results