45 lines
1.0 KiB
YAML
45 lines
1.0 KiB
YAML
name: '🧪 Test Plugin'
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- develop
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- develop
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Verify .NET installation
|
|
run: dotnet --version
|
|
|
|
- name: Restore dependencies
|
|
run: dotnet restore Jellyfin.Plugin.Jellypod.sln
|
|
|
|
- name: Build solution
|
|
run: dotnet build Jellyfin.Plugin.Jellypod.sln --configuration Debug --no-restore --no-self-contained
|
|
|
|
- name: Run tests
|
|
run: dotnet test Jellyfin.Plugin.Jellypod.sln --no-build --configuration Debug --verbosity normal --logger "trx;LogFileName=test-results.trx"
|
|
|
|
- name: Upload test results
|
|
if: always()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: test-results
|
|
path: '**/test-results.trx'
|
|
retention-days: 7
|