Skip to content

On demand tests

On demand tests #12

Workflow file for this run

name: On demand tests
on:
workflow_dispatch:
inputs:
test_pattern:
description: 'Test --filter pattern'
default: '*'
required: false
jobs:
on-demand-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest, macos-13]
fail-fast: false
env:
DOTNET_VERSION: 8.0.x
DOTNET_CLI_TELEMETRY_OPTOUT: 1
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Nuget cache
uses: actions/cache@v4
with:
path:
~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Build
run: dotnet build -c Release
- name: Running tests with `--filter '${{ github.event.inputs.test_pattern }}'
run: dotnet test -c Release --no-build --filter '${{ github.event.inputs.test_pattern }}' -v normal