2023-11-10 10:12:21 -05:00
|
|
|
name: Tests
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
# Run tests against the forked branch, but
|
|
|
|
# do not allow access to secrets
|
|
|
|
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflows-in-forked-repositories
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
env:
|
2023-11-15 10:16:51 -05:00
|
|
|
SDK_VERSION: "8.0.x"
|
2023-11-10 10:12:21 -05:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
run-tests:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
|
|
|
|
|
|
|
|
runs-on: "${{ matrix.os }}"
|
|
|
|
steps:
|
2023-11-10 10:34:15 -05:00
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
2023-11-10 10:12:21 -05:00
|
|
|
|
2023-12-04 10:55:08 -05:00
|
|
|
- uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4
|
2023-11-10 10:12:21 -05:00
|
|
|
with:
|
|
|
|
dotnet-version: ${{ env.SDK_VERSION }}
|
|
|
|
|
|
|
|
- name: Run DotNet CLI Tests
|
|
|
|
run: >
|
|
|
|
dotnet test Jellyfin.sln
|
|
|
|
--configuration Release
|
|
|
|
--collect:"XPlat Code Coverage"
|
|
|
|
--settings tests/coverletArgs.runsettings
|
|
|
|
--verbosity minimal
|
|
|
|
|
|
|
|
- name: Merge code coverage results
|
2023-11-14 15:11:11 -05:00
|
|
|
uses: danielpalme/ReportGenerator-GitHub-Action@4d510cbed8a05af5aefea46c7fd6e05b95844c89 # 5
|
2023-11-10 10:12:21 -05:00
|
|
|
with:
|
|
|
|
reports: "**/coverage.cobertura.xml"
|
|
|
|
targetdir: "merged/"
|
|
|
|
reporttypes: "Cobertura"
|
|
|
|
|
|
|
|
# TODO - which action / tool to use to publish code coverage results?
|
|
|
|
# - name: Publish code coverage results
|