Files
Nemera/.github/workflows/run-tests.yml
T

42 lines
1.4 KiB
YAML

name: Run All Tests
on:
pull_request:
branches:
- master
workflow_dispatch: # enable manual triggers
jobs:
run-platform-tests:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v2
- name: Set up .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '10.0.x'
- name: Restore Six Labors license
shell: bash
run: printf '%s\n' "${{ secrets.SIXLABORS_LICENSE_KEY }}" > src/Lumina.Domain/sixlabors.lic
- name: Restore dependencies
run: dotnet restore src/Lumina.sln
- name: Build
run: dotnet build src/Lumina.sln --no-restore -p:SixLaborsLicenseEnforceBuild=true
- name: Run tests
# blame-hang terminates a test that blocks for 10 minutes and dumps the hang stack,
# turning the recurring 'stuck job' into a failing job that names the culprit test
run: dotnet test src/Lumina.sln --no-build --verbosity normal --blame-hang --blame-hang-timeout 10m
- name: Upload hang diagnostics
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-hang-diagnostics-${{ matrix.os }}
path: |
**/TestResults/**/*.dmp
**/TestResults/**/*.log
if-no-files-found: ignore