Files

49 lines
1.8 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-15-intel]
steps:
- uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.100'
- name: Raise file watcher limits
# The test hosts create a Razor file watcher per static asset, and the default limit of 128 inotify instances
# is reached when several hosts run in parallel.
if: runner.os == 'Linux'
run: sudo sysctl -w fs.inotify.max_user_instances=1024 fs.inotify.max_user_watches=524288
- name: Restore Six Labors license
shell: bash
env:
SIXLABORS_LICENSE_KEY: ${{ secrets.SIXLABORS_LICENSE_KEY }}
run: printf '%s\n' "$SIXLABORS_LICENSE_KEY" > src/Nemera.Domain/sixlabors.lic
- name: Restore dependencies
run: dotnet restore src/Nemera.slnx
- name: Build
run: dotnet build src/Nemera.slnx --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/Nemera.slnx --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