Skip to content

Bump actions/github-script from 8 to 9 #107

Bump actions/github-script from 8 to 9

Bump actions/github-script from 8 to 9 #107

Workflow file for this run

name: Tests
on:
workflow_dispatch:
inputs:
version:
description: "Version number (leave empty for auto)"
required: false
type: string
pull_request:
branches:
- main
push:
branches:
- main
paths-ignore:
- "README.md"
- ".github/**"
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
jobs:
test:
name: test
runs-on: ubuntu-latest
defaults:
run:
shell: pwsh
steps:
- name: Show Inputs
run: |
echo "Inputs: ${{ toJSON(github.event.inputs) }}"
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 1
clean: true
- name: Setup .NET
uses: ./.github/actions/setup-dotnet
- name: Install macOS workload
run: dotnet workload install macos
- name: Restore Solution
run: dotnet restore ControlR.slnx
- name: Build Solution
run: dotnet build ControlR.slnx -c Release --no-restore
- name: Run Tests
run: |
$testProjects = Get-ChildItem -Path "Tests" -Recurse -Filter "*.csproj" |
Where-Object { $_.Name -like "*.Tests.csproj" } |
Sort-Object FullName
if ($testProjects.Count -eq 0) {
throw "No test projects were found under Tests/."
}
foreach ($project in $testProjects) {
Write-Host "Running $($project.FullName)..."
dotnet run --project $project.FullName -c Release --no-build --no-restore
if ($LASTEXITCODE -ne 0) {
throw "Test execution failed for $($project.FullName)."
}
}