Skip to content

Merge pull request #110 from FixeQyt/patch-1 #14

Merge pull request #110 from FixeQyt/patch-1

Merge pull request #110 from FixeQyt/patch-1 #14

Workflow file for this run

name: .NET Build and Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Restore dependencies
run: |
cd SkEditor
dotnet restore
- name: Build project
run: |
cd SkEditor
dotnet publish -c Release -r win-x64 -p:PublishSingleFile=true -p:PublishReadyToRun=true --no-self-contained --nologo -v q --property WarningLevel=0 /clp:ErrorsOnly /p:DebugType=None /p:DebugSymbols=false
- name: Check executable path
run: |
$exePath = "SkEditor\\bin\\Release\\net8.0\\win-x64\\publish\\SkEditor.exe"
if (Test-Path $exePath) {
Write-Host "Executable found at $exePath"
} else {
Write-Host "Executable not found at $exePath"
exit 1
}
- name: Run tests
run: |
$exePath = "SkEditor\\bin\\Release\\net8.0\\win-x64\\publish\\SkEditor.exe"
Write-Host "Running tests from $exePath"
& $exePath --test | Out-File -FilePath test_output.txt
$result = Get-Content -Path test_output.txt
Write-Host "Test result: $result"
if ($result -match "Test passed") {
Write-Host "Tests passed"
} else {
Write-Host "Tests failed"
exit 1
}