`AudioSignature` is the DSP — band table, periodic Hann, radix-2 FFT, band-mean peak, energy class, packing — and `AudioSignatureService` the decode, running the FFmpeg binary `IMediaEncoder.EncoderPath` names. The plugin gained no dependency. The server specification's prose does not determine a byte stream, so the parameters it leaves open are pinned by the fixture shared with the extraction repo and restated at the top of `AudioSignature`: double throughout, whole frames only, periodic Hann, unnormalised FFT, band mean rather than sum, argmax ties to the lowest index. `fixtures/audio/` holds the extraction repo's three files byte-identically and the computed signature equals the recorded vector exactly. The binding check regenerates the fixture PCM from `make_fixture.py`'s arithmetic and verifies it against the recorded decode checksums, so it runs on a host with no codec at all and a decode divergence stays distinguishable from a DSP one; the two tests that drive real FFmpeg self-skip without a binary. The workflow named "Test Plugin" until now only compiled one. A test that is built and never run is not evidence, and a golden vector shared across two repos exists precisely so CI fails when they drift. TRACES: JR-042, JR-043 | SR-003
58 lines
1.7 KiB
YAML
58 lines
1.7 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: linux/amd64
|
|
container:
|
|
image: gitea.tourolle.paris/dtourolle/jray-builder:latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: test-${{ github.run_id }}
|
|
|
|
- name: Cache NuGet packages
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.nuget/packages
|
|
key: nuget-${{ hashFiles('**/Jellyfin.Plugin.JRay.csproj') }}
|
|
restore-keys: nuget-
|
|
|
|
- name: Restore dependencies
|
|
working-directory: test-${{ github.run_id }}
|
|
run: dotnet restore Jellyfin.Plugin.JRay.sln
|
|
|
|
- name: Build solution
|
|
working-directory: test-${{ github.run_id }}
|
|
run: dotnet build Jellyfin.Plugin.JRay.sln --configuration Debug --no-restore --no-self-contained /m:1
|
|
|
|
# The workflow is named "Test Plugin" and until now only compiled one. A
|
|
# test that is built but never run is not evidence, and JR-043 is the case
|
|
# that makes it matter: the point of a golden vector shared with the
|
|
# extraction repo is that CI fails when the two implementations drift.
|
|
# T1 needs no ASP.NET runtime and no FFmpeg — the audio golden check
|
|
# regenerates its own fixture PCM.
|
|
- name: Run tests
|
|
working-directory: test-${{ github.run_id }}
|
|
run: dotnet test Jellyfin.Plugin.JRay.sln --configuration Debug --no-restore --no-build
|
|
|
|
- name: Cleanup
|
|
if: always()
|
|
run: rm -rf test-${{ github.run_id }}
|