The builder image is now multi-arch (linux/amd64 + linux/arm64, pushed as srfplay-builder:latest after building all three plugin zips in each variant), so jobs no longer need an amd64 host. runs-on moves from linux/amd64 to ubuntu-latest, which draco-x86, freebox and oracle-a1 all carry, so a job no longer waits behind long jobs on draco while the ARM runners sit idle. .gitea/runner/cloud-init.yaml sets up such a runner on an Oracle Cloud Always Free Ampere VM (Ubuntu 24.04): Docker, act_runner registered instance-wide with the instance's label set, and a weekly image prune. The registration token and the optional console password hash are placeholders here and must be filled in locally before use. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
60 lines
1.6 KiB
YAML
60 lines
1.6 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
|
|
container:
|
|
image: gitea.tourolle.paris/dtourolle/srfplay-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.SRFPlay.csproj', '**/Jellyfin.Plugin.SRFPlay.Tests.csproj') }}
|
|
restore-keys: nuget-
|
|
|
|
- name: Restore dependencies
|
|
working-directory: test-${{ github.run_id }}
|
|
run: dotnet restore Jellyfin.Plugin.SRFPlay.sln
|
|
|
|
- name: Build solution
|
|
working-directory: test-${{ github.run_id }}
|
|
run: dotnet build Jellyfin.Plugin.SRFPlay.sln --configuration Debug --no-restore --no-self-contained /m:1
|
|
|
|
- name: Run tests
|
|
working-directory: test-${{ github.run_id }}
|
|
run: dotnet test Jellyfin.Plugin.SRFPlay.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-${{ github.run_id }}/**/test-results.trx
|
|
retention-days: 7
|
|
|
|
- name: Cleanup
|
|
if: always()
|
|
run: rm -rf test-${{ github.run_id }}
|