From 8c1a064f7cc6466645e387efd4df624d9877154a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Apr 2026 14:40:59 +0000 Subject: [PATCH 1/8] Add OpenAPI smoke test script Agent-Logs-Url: https://github.com/christianhelle/openapi2zig/sessions/a6efb0d4-81d7-415c-be7d-1f32a3f0c357 Co-authored-by: christianhelle <710400+christianhelle@users.noreply.github.com> --- .github/workflows/ci.yml | 7 +- README.md | 10 +++ test/smoke-tests.ps1 | 152 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 165 insertions(+), 4 deletions(-) create mode 100644 test/smoke-tests.ps1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c02cbc..a9a6fe7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -153,7 +153,6 @@ jobs: - name: Verify Zig installation run: zig version - - name: Generate Code using OpenAPI v3.0 Petstore example - run: | - zig build run-generate - zig run generated/main.zig + - name: Run smoke tests + shell: pwsh + run: ./test/smoke-tests.ps1 diff --git a/README.md b/README.md index 63c2db6..8c5d889 100644 --- a/README.md +++ b/README.md @@ -250,6 +250,16 @@ zig build-exe generated/main.zig -fno-emit-bin zig build test-package ``` +### Smoke tests + +The pull request workflow runs `test/smoke-tests.ps1` to generate Zig clients from each supported JSON OpenAPI example under `openapi/` one at a time and compile each generated file. The script prints the current specification before generation and compilation so failures identify the exact input file. + +```powershell +pwsh ./test/smoke-tests.ps1 +``` + +YAML examples are skipped by default because YAML input is not implemented yet. Use `-IncludeYaml` when YAML generation support is added. + ## Using as a Library openapi2zig can also be used as a Zig library for parsing OpenAPI/Swagger specifications and generating code programmatically. diff --git a/test/smoke-tests.ps1 b/test/smoke-tests.ps1 new file mode 100644 index 0000000..57feb3b --- /dev/null +++ b/test/smoke-tests.ps1 @@ -0,0 +1,152 @@ +param ( + [Parameter(Mandatory=$false)] + [switch] + $UseInstalled = $false, + + [Parameter(Mandatory=$false)] + [switch] + $IncludeYaml = $false, + + [Parameter(Mandatory=$false)] + [string] + $OutputRoot = "./.zig-cache/smoke-tests" +) + +$ErrorActionPreference = "Stop" + +function Invoke-NativeCommand { + param ( + [Parameter(Mandatory=$true)] + [string] + $FilePath, + + [Parameter(Mandatory=$false)] + [string[]] + $Arguments = @(), + + [Parameter(Mandatory=$false)] + [string] + $FailureMessage = "Native command failed" + ) + + Write-Host "> $FilePath $($Arguments -join ' ')" + & $FilePath @Arguments + if ($LASTEXITCODE -ne 0) { + throw "$FailureMessage (exit code: $LASTEXITCODE)" + } +} + +function Get-OpenApiSpecs { + param ( + [Parameter(Mandatory=$true)] + [string] + $OpenApiRoot, + + [Parameter(Mandatory=$true)] + [bool] + $IncludeYamlSpecs + ) + + $extensions = @(".json") + if ($IncludeYamlSpecs) { + $extensions += @(".yaml", ".yml") + } + + Get-ChildItem -Path $OpenApiRoot -Recurse -File | + Where-Object { + $extensions -contains $_.Extension.ToLowerInvariant() -and + $_.FullName -notmatch "[\\/]json-schema[\\/]" + } | + Sort-Object FullName +} + +function Get-SafeName { + param ( + [Parameter(Mandatory=$true)] + [string] + $Value + ) + + return ($Value -replace '[^A-Za-z0-9_.-]', '_') +} + +$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path +$openApiRoot = Join-Path $repoRoot "openapi" +$outputRootPath = Join-Path $repoRoot $OutputRoot + +if (-not (Test-Path -Path $openApiRoot -PathType Container)) { + throw "OpenAPI examples directory not found: $openApiRoot" +} + +Push-Location $repoRoot +try { + Invoke-NativeCommand -FilePath "zig" -Arguments @("version") -FailureMessage "Zig is required to run smoke tests" + + $openapi2zig = "openapi2zig" + if (-not $UseInstalled) { + Write-Host "`n=== Building openapi2zig ===`n" + Invoke-NativeCommand -FilePath "zig" -Arguments @("build", "-Doptimize=Debug") -FailureMessage "Failed to build openapi2zig" + + $binaryName = if ($IsWindows) { "openapi2zig.exe" } else { "openapi2zig" } + $openapi2zig = Join-Path $repoRoot (Join-Path "zig-out/bin" $binaryName) + if (-not (Test-Path -Path $openapi2zig -PathType Leaf)) { + throw "Built openapi2zig binary not found: $openapi2zig" + } + } + + if (Test-Path -Path $outputRootPath) { + Remove-Item -Path $outputRootPath -Recurse -Force + } + New-Item -Path $outputRootPath -ItemType Directory -Force | Out-Null + + $specs = @(Get-OpenApiSpecs -OpenApiRoot $openApiRoot -IncludeYamlSpecs $IncludeYaml.IsPresent) + if ($specs.Count -eq 0) { + throw "No OpenAPI specification examples found under $openApiRoot" + } + + if (-not $IncludeYaml) { + $yamlCount = @(Get-ChildItem -Path $openApiRoot -Recurse -File -Include "*.yaml", "*.yml" | Where-Object { $_.FullName -notmatch "[\\/]json-schema[\\/]" }).Count + if ($yamlCount -gt 0) { + Write-Host "Skipping $yamlCount YAML specs because YAML input is not implemented by openapi2zig yet. Use -IncludeYaml to verify YAML support when it is available." + } + } + + Write-Host "`n=== Smoke testing $($specs.Count) OpenAPI JSON specification examples ===`n" + + for ($i = 0; $i -lt $specs.Count; $i++) { + $spec = $specs[$i] + $relativeSpec = [System.IO.Path]::GetRelativePath($repoRoot, $spec.FullName) + $safeName = Get-SafeName -Value ([System.IO.Path]::ChangeExtension($relativeSpec, $null)) + $caseOutputRoot = Join-Path $outputRootPath $safeName + $generatedFile = Join-Path $caseOutputRoot "client.zig" + $compileFile = Join-Path $caseOutputRoot "compile.zig" + + New-Item -Path $caseOutputRoot -ItemType Directory -Force | Out-Null + + Write-Host "`n[$($i + 1)/$($specs.Count)] Generating $relativeSpec" + Invoke-NativeCommand ` + -FilePath $openapi2zig ` + -Arguments @("generate", "-i", $spec.FullName, "-o", $generatedFile) ` + -FailureMessage "Generation failed for $relativeSpec" + + @' +const std = @import("std"); +const generated = @import("client.zig"); + +test "generated client compiles" { + std.testing.refAllDecls(generated); +} +'@ | Set-Content -Path $compileFile -Encoding utf8NoBOM + + Write-Host "[$($i + 1)/$($specs.Count)] Compiling generated Zig for $relativeSpec" + Invoke-NativeCommand ` + -FilePath "zig" ` + -Arguments @("test", $compileFile) ` + -FailureMessage "Generated Zig failed to compile for $relativeSpec" + } + + Write-Host "`nSmoke tests passed for $($specs.Count) OpenAPI specification examples." +} +finally { + Pop-Location +} From 8ec9608bd4000e0781fd709d216b33a9b1923a3d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Apr 2026 14:43:00 +0000 Subject: [PATCH 2/8] Improve smoke test prerequisite checks Agent-Logs-Url: https://github.com/christianhelle/openapi2zig/sessions/a6efb0d4-81d7-415c-be7d-1f32a3f0c357 Co-authored-by: christianhelle <710400+christianhelle@users.noreply.github.com> --- test/smoke-tests.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/smoke-tests.ps1 b/test/smoke-tests.ps1 index 57feb3b..cdb87c1 100644 --- a/test/smoke-tests.ps1 +++ b/test/smoke-tests.ps1 @@ -29,6 +29,10 @@ function Invoke-NativeCommand { $FailureMessage = "Native command failed" ) + if (-not (Get-Command $FilePath -ErrorAction SilentlyContinue)) { + throw "$FailureMessage. Command not found: $FilePath" + } + Write-Host "> $FilePath $($Arguments -join ' ')" & $FilePath @Arguments if ($LASTEXITCODE -ne 0) { @@ -111,7 +115,7 @@ try { } } - Write-Host "`n=== Smoke testing $($specs.Count) OpenAPI JSON specification examples ===`n" + Write-Host "`n=== Smoke testing $($specs.Count) OpenAPI specification examples ===`n" for ($i = 0; $i -lt $specs.Count; $i++) { $spec = $specs[$i] From 63c0bdec5393778e4808f565982ed902943fb815 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Apr 2026 14:44:38 +0000 Subject: [PATCH 3/8] Address smoke test validation feedback Agent-Logs-Url: https://github.com/christianhelle/openapi2zig/sessions/a6efb0d4-81d7-415c-be7d-1f32a3f0c357 Co-authored-by: christianhelle <710400+christianhelle@users.noreply.github.com> --- README.md | 2 +- test/smoke-tests.ps1 | 26 ++++++++++++++++++++------ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8c5d889..b4528a1 100644 --- a/README.md +++ b/README.md @@ -252,7 +252,7 @@ zig build test-package ### Smoke tests -The pull request workflow runs `test/smoke-tests.ps1` to generate Zig clients from each supported JSON OpenAPI example under `openapi/` one at a time and compile each generated file. The script prints the current specification before generation and compilation so failures identify the exact input file. +The pull request workflow runs `test/smoke-tests.ps1` to generate Zig clients from each supported JSON OpenAPI example under `openapi/` one at a time and compile each generated file. The script prints the current specification before generation and compilation, making it easy to identify which input file caused a failure. ```powershell pwsh ./test/smoke-tests.ps1 diff --git a/test/smoke-tests.ps1 b/test/smoke-tests.ps1 index cdb87c1..8ddc44b 100644 --- a/test/smoke-tests.ps1 +++ b/test/smoke-tests.ps1 @@ -40,6 +40,21 @@ function Invoke-NativeCommand { } } +function Test-IsOpenApiExampleSpec { + param ( + [Parameter(Mandatory=$true)] + [System.IO.FileInfo] + $File, + + [Parameter(Mandatory=$true)] + [string[]] + $Extensions + ) + + return $Extensions -contains $File.Extension.ToLowerInvariant() -and + $File.FullName -notmatch "[\\/]json-schema[\\/]" +} + function Get-OpenApiSpecs { param ( [Parameter(Mandatory=$true)] @@ -57,10 +72,7 @@ function Get-OpenApiSpecs { } Get-ChildItem -Path $OpenApiRoot -Recurse -File | - Where-Object { - $extensions -contains $_.Extension.ToLowerInvariant() -and - $_.FullName -notmatch "[\\/]json-schema[\\/]" - } | + Where-Object { Test-IsOpenApiExampleSpec -File $_ -Extensions $extensions } | Sort-Object FullName } @@ -91,7 +103,8 @@ try { Write-Host "`n=== Building openapi2zig ===`n" Invoke-NativeCommand -FilePath "zig" -Arguments @("build", "-Doptimize=Debug") -FailureMessage "Failed to build openapi2zig" - $binaryName = if ($IsWindows) { "openapi2zig.exe" } else { "openapi2zig" } + $isWindowsPlatform = $PSVersionTable.Platform -eq "Win32NT" -or $env:OS -eq "Windows_NT" + $binaryName = if ($isWindowsPlatform) { "openapi2zig.exe" } else { "openapi2zig" } $openapi2zig = Join-Path $repoRoot (Join-Path "zig-out/bin" $binaryName) if (-not (Test-Path -Path $openapi2zig -PathType Leaf)) { throw "Built openapi2zig binary not found: $openapi2zig" @@ -109,7 +122,8 @@ try { } if (-not $IncludeYaml) { - $yamlCount = @(Get-ChildItem -Path $openApiRoot -Recurse -File -Include "*.yaml", "*.yml" | Where-Object { $_.FullName -notmatch "[\\/]json-schema[\\/]" }).Count + $yamlExtensions = @(".yaml", ".yml") + $yamlCount = @(Get-ChildItem -Path $openApiRoot -Recurse -File | Where-Object { Test-IsOpenApiExampleSpec -File $_ -Extensions $yamlExtensions }).Count if ($yamlCount -gt 0) { Write-Host "Skipping $yamlCount YAML specs because YAML input is not implemented by openapi2zig yet. Use -IncludeYaml to verify YAML support when it is available." } From 8ec4eb3e7f284079e7a2d555fa655f6e3e641cd9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Apr 2026 14:45:28 +0000 Subject: [PATCH 4/8] Refine smoke test portability Agent-Logs-Url: https://github.com/christianhelle/openapi2zig/sessions/a6efb0d4-81d7-415c-be7d-1f32a3f0c357 Co-authored-by: christianhelle <710400+christianhelle@users.noreply.github.com> --- README.md | 2 +- test/smoke-tests.ps1 | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b4528a1..47b9375 100644 --- a/README.md +++ b/README.md @@ -252,7 +252,7 @@ zig build test-package ### Smoke tests -The pull request workflow runs `test/smoke-tests.ps1` to generate Zig clients from each supported JSON OpenAPI example under `openapi/` one at a time and compile each generated file. The script prints the current specification before generation and compilation, making it easy to identify which input file caused a failure. +The pull request workflow runs `test/smoke-tests.ps1` to generate and compile Zig clients from each supported JSON OpenAPI example under `openapi/`. The script prints the current specification before each operation, making it easy to identify which input file caused a failure. ```powershell pwsh ./test/smoke-tests.ps1 diff --git a/test/smoke-tests.ps1 b/test/smoke-tests.ps1 index 8ddc44b..6e161b5 100644 --- a/test/smoke-tests.ps1 +++ b/test/smoke-tests.ps1 @@ -51,6 +51,7 @@ function Test-IsOpenApiExampleSpec { $Extensions ) + # The json-schema folder contains reference schemas, not API examples that openapi2zig can generate clients from. return $Extensions -contains $File.Extension.ToLowerInvariant() -and $File.FullName -notmatch "[\\/]json-schema[\\/]" } @@ -83,7 +84,7 @@ function Get-SafeName { $Value ) - return ($Value -replace '[^A-Za-z0-9_.-]', '_') + return ($Value -replace '[^A-Za-z0-9_]', '_') } $repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path @@ -103,7 +104,7 @@ try { Write-Host "`n=== Building openapi2zig ===`n" Invoke-NativeCommand -FilePath "zig" -Arguments @("build", "-Doptimize=Debug") -FailureMessage "Failed to build openapi2zig" - $isWindowsPlatform = $PSVersionTable.Platform -eq "Win32NT" -or $env:OS -eq "Windows_NT" + $isWindowsPlatform = [System.Environment]::OSVersion.Platform -eq [System.PlatformID]::Win32NT $binaryName = if ($isWindowsPlatform) { "openapi2zig.exe" } else { "openapi2zig" } $openapi2zig = Join-Path $repoRoot (Join-Path "zig-out/bin" $binaryName) if (-not (Test-Path -Path $openapi2zig -PathType Leaf)) { From eac1c8287b25186bedbd4e06915520c9ace5e394 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Apr 2026 14:46:33 +0000 Subject: [PATCH 5/8] Document smoke test timing expectations Agent-Logs-Url: https://github.com/christianhelle/openapi2zig/sessions/a6efb0d4-81d7-415c-be7d-1f32a3f0c357 Co-authored-by: christianhelle <710400+christianhelle@users.noreply.github.com> --- README.md | 2 +- test/smoke-tests.ps1 | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 47b9375..356fc75 100644 --- a/README.md +++ b/README.md @@ -252,7 +252,7 @@ zig build test-package ### Smoke tests -The pull request workflow runs `test/smoke-tests.ps1` to generate and compile Zig clients from each supported JSON OpenAPI example under `openapi/`. The script prints the current specification before each operation, making it easy to identify which input file caused a failure. +The pull request workflow runs `test/smoke-tests.ps1` to generate and compile Zig clients from each supported JSON OpenAPI example under `openapi/`. The script prints the current specification before each operation, making it easy to identify which input file caused a failure. Expect the full suite to take several minutes because it builds the CLI and compiles generated code for every supported example. ```powershell pwsh ./test/smoke-tests.ps1 diff --git a/test/smoke-tests.ps1 b/test/smoke-tests.ps1 index 6e161b5..14c4ab5 100644 --- a/test/smoke-tests.ps1 +++ b/test/smoke-tests.ps1 @@ -102,6 +102,7 @@ try { $openapi2zig = "openapi2zig" if (-not $UseInstalled) { Write-Host "`n=== Building openapi2zig ===`n" + Write-Host "Initial Zig builds can take several minutes; do not cancel this step." Invoke-NativeCommand -FilePath "zig" -Arguments @("build", "-Doptimize=Debug") -FailureMessage "Failed to build openapi2zig" $isWindowsPlatform = [System.Environment]::OSVersion.Platform -eq [System.PlatformID]::Win32NT @@ -126,7 +127,7 @@ try { $yamlExtensions = @(".yaml", ".yml") $yamlCount = @(Get-ChildItem -Path $openApiRoot -Recurse -File | Where-Object { Test-IsOpenApiExampleSpec -File $_ -Extensions $yamlExtensions }).Count if ($yamlCount -gt 0) { - Write-Host "Skipping $yamlCount YAML specs because YAML input is not implemented by openapi2zig yet. Use -IncludeYaml to verify YAML support when it is available." + Write-Host "Skipping $yamlCount YAML specs because YAML input has not been implemented by openapi2zig yet. Use -IncludeYaml to verify YAML support when it is available." } } @@ -158,6 +159,7 @@ test "generated client compiles" { '@ | Set-Content -Path $compileFile -Encoding utf8NoBOM Write-Host "[$($i + 1)/$($specs.Count)] Compiling generated Zig for $relativeSpec" + Write-Host "Generated code compilation can take several minutes across all specifications; do not cancel this step." Invoke-NativeCommand ` -FilePath "zig" ` -Arguments @("test", $compileFile) ` From be8a383131073ede579e0bf2ca3fef51cad21b1c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Apr 2026 14:47:26 +0000 Subject: [PATCH 6/8] Add smoke test CI timeout Agent-Logs-Url: https://github.com/christianhelle/openapi2zig/sessions/a6efb0d4-81d7-415c-be7d-1f32a3f0c357 Co-authored-by: christianhelle <710400+christianhelle@users.noreply.github.com> --- .github/workflows/ci.yml | 1 + test/smoke-tests.ps1 | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9a6fe7..fc1a6a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -155,4 +155,5 @@ jobs: - name: Run smoke tests shell: pwsh + timeout-minutes: 15 run: ./test/smoke-tests.ps1 diff --git a/test/smoke-tests.ps1 b/test/smoke-tests.ps1 index 14c4ab5..add154c 100644 --- a/test/smoke-tests.ps1 +++ b/test/smoke-tests.ps1 @@ -102,7 +102,7 @@ try { $openapi2zig = "openapi2zig" if (-not $UseInstalled) { Write-Host "`n=== Building openapi2zig ===`n" - Write-Host "Initial Zig builds can take several minutes; do not cancel this step." + Write-Host "Initial Zig builds and generated code compilation can take several minutes; do not cancel these steps." Invoke-NativeCommand -FilePath "zig" -Arguments @("build", "-Doptimize=Debug") -FailureMessage "Failed to build openapi2zig" $isWindowsPlatform = [System.Environment]::OSVersion.Platform -eq [System.PlatformID]::Win32NT @@ -132,6 +132,7 @@ try { } Write-Host "`n=== Smoke testing $($specs.Count) OpenAPI specification examples ===`n" + Write-Host "Generated code compilation can take several minutes across all specifications; do not cancel this step." for ($i = 0; $i -lt $specs.Count; $i++) { $spec = $specs[$i] @@ -159,7 +160,6 @@ test "generated client compiles" { '@ | Set-Content -Path $compileFile -Encoding utf8NoBOM Write-Host "[$($i + 1)/$($specs.Count)] Compiling generated Zig for $relativeSpec" - Write-Host "Generated code compilation can take several minutes across all specifications; do not cancel this step." Invoke-NativeCommand ` -FilePath "zig" ` -Arguments @("test", $compileFile) ` From 52f428ac88b5d8783c3e40ec14b7348de51e0739 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Apr 2026 14:48:24 +0000 Subject: [PATCH 7/8] Simplify smoke spec discovery Agent-Logs-Url: https://github.com/christianhelle/openapi2zig/sessions/a6efb0d4-81d7-415c-be7d-1f32a3f0c357 Co-authored-by: christianhelle <710400+christianhelle@users.noreply.github.com> --- test/smoke-tests.ps1 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/smoke-tests.ps1 b/test/smoke-tests.ps1 index add154c..8c024fc 100644 --- a/test/smoke-tests.ps1 +++ b/test/smoke-tests.ps1 @@ -52,8 +52,9 @@ function Test-IsOpenApiExampleSpec { ) # The json-schema folder contains reference schemas, not API examples that openapi2zig can generate clients from. + $normalizedPath = $File.FullName.Replace('\', '/') return $Extensions -contains $File.Extension.ToLowerInvariant() -and - $File.FullName -notmatch "[\\/]json-schema[\\/]" + $normalizedPath -notlike "*/json-schema/*" } function Get-OpenApiSpecs { @@ -118,14 +119,18 @@ try { } New-Item -Path $outputRootPath -ItemType Directory -Force | Out-Null - $specs = @(Get-OpenApiSpecs -OpenApiRoot $openApiRoot -IncludeYamlSpecs $IncludeYaml.IsPresent) + $allSpecs = @(Get-OpenApiSpecs -OpenApiRoot $openApiRoot -IncludeYamlSpecs $true) + $specs = if ($IncludeYaml) { + $allSpecs + } else { + @($allSpecs | Where-Object { $_.Extension.ToLowerInvariant() -eq ".json" }) + } if ($specs.Count -eq 0) { throw "No OpenAPI specification examples found under $openApiRoot" } if (-not $IncludeYaml) { - $yamlExtensions = @(".yaml", ".yml") - $yamlCount = @(Get-ChildItem -Path $openApiRoot -Recurse -File | Where-Object { Test-IsOpenApiExampleSpec -File $_ -Extensions $yamlExtensions }).Count + $yamlCount = @($allSpecs | Where-Object { $_.Extension.ToLowerInvariant() -in @(".yaml", ".yml") }).Count if ($yamlCount -gt 0) { Write-Host "Skipping $yamlCount YAML specs because YAML input has not been implemented by openapi2zig yet. Use -IncludeYaml to verify YAML support when it is available." } From b67544cf1e8a3e9eb967cadc0806eae5e5ffdf82 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Apr 2026 14:49:18 +0000 Subject: [PATCH 8/8] Clarify smoke test timing messages Agent-Logs-Url: https://github.com/christianhelle/openapi2zig/sessions/a6efb0d4-81d7-415c-be7d-1f32a3f0c357 Co-authored-by: christianhelle <710400+christianhelle@users.noreply.github.com> --- test/smoke-tests.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/smoke-tests.ps1 b/test/smoke-tests.ps1 index 8c024fc..9608b08 100644 --- a/test/smoke-tests.ps1 +++ b/test/smoke-tests.ps1 @@ -103,7 +103,7 @@ try { $openapi2zig = "openapi2zig" if (-not $UseInstalled) { Write-Host "`n=== Building openapi2zig ===`n" - Write-Host "Initial Zig builds and generated code compilation can take several minutes; do not cancel these steps." + Write-Host "Initial Zig builds can take 2-5 minutes, and generated code compilation across all specs can take several more minutes; do not cancel these steps." Invoke-NativeCommand -FilePath "zig" -Arguments @("build", "-Doptimize=Debug") -FailureMessage "Failed to build openapi2zig" $isWindowsPlatform = [System.Environment]::OSVersion.Platform -eq [System.PlatformID]::Win32NT @@ -137,7 +137,7 @@ try { } Write-Host "`n=== Smoke testing $($specs.Count) OpenAPI specification examples ===`n" - Write-Host "Generated code compilation can take several minutes across all specifications; do not cancel this step." + Write-Host "Generated code compilation runs once per specification and can take several minutes across the full suite; CI allows up to 15 minutes for this job." for ($i = 0; $i -lt $specs.Count; $i++) { $spec = $specs[$i]