mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-06 09:03:03 +03:00
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
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:
|
|
SDK_VERSION: "9.0.x"
|
|
|
|
jobs:
|
|
run-tests:
|
|
strategy:
|
|
matrix:
|
|
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
|
|
fail-fast: false
|
|
|
|
runs-on: "${{ matrix.os }}"
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
|
|
- uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5.0.1
|
|
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
|
|
uses: danielpalme/ReportGenerator-GitHub-Action@ee0ae774f6d3afedcbd1683c1ab21b83670bdf8e # v5.5.1
|
|
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
|