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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
  21. - uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5.0.1
  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@ee0ae774f6d3afedcbd1683c1ab21b83670bdf8e # v5.5.1
  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