Skip to content

docs: refresh v100 gap register against alpha4 #188

docs: refresh v100 gap register against alpha4

docs: refresh v100 gap register against alpha4 #188

name: cross-platform-source-smoke
on:
push:
branches:
- main
- master
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
source-smoke:
name: source smoke (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- windows-2025
- ubuntu-latest
- macos-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Restore, build, and test
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
$PSNativeCommandUseErrorActionPreference = $true
dotnet restore AgentContextKit.sln
dotnet build AgentContextKit.sln -c Release --no-restore
dotnet test AgentContextKit.sln -c Release --no-build
- name: Pack and install source tool
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
$PSNativeCommandUseErrorActionPreference = $true
$packageRoot = Join-Path $env:RUNNER_TEMP "ackit-source-nupkg"
$toolRoot = Join-Path $env:RUNNER_TEMP "ackit-source-tool"
if (Test-Path $packageRoot) {
Remove-Item -LiteralPath $packageRoot -Recurse -Force
}
if (Test-Path $toolRoot) {
Remove-Item -LiteralPath $toolRoot -Recurse -Force
}
New-Item -ItemType Directory -Force -Path $packageRoot, $toolRoot | Out-Null
dotnet pack src/AgentContextKit.Cli/AgentContextKit.Cli.csproj -c Release -o $packageRoot
dotnet tool install AgentContextKit --tool-path $toolRoot --add-source $packageRoot --version 0.2.0-alpha.4 --ignore-failed-sources
if ($IsWindows) {
$ackit = Join-Path $toolRoot "ackit.exe"
}
else {
$ackit = Join-Path $toolRoot "ackit"
}
"ACKIT_EXE=$ackit" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Run source package smoke test
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
$PSNativeCommandUseErrorActionPreference = $true
& $env:ACKIT_EXE version
& $env:ACKIT_EXE --help
$smokeRoot = Join-Path $env:RUNNER_TEMP "ackit-cross-platform-source-smoke"
if (Test-Path $smokeRoot) {
Remove-Item -LiteralPath $smokeRoot -Recurse -Force
}
New-Item -ItemType Directory -Force -Path $smokeRoot | Out-Null
Push-Location $smokeRoot
try {
dotnet new console -n DemoApp
Push-Location DemoApp
try {
git init
& $env:ACKIT_EXE init --lang en
& $env:ACKIT_EXE scan --ci
& $env:ACKIT_EXE generate --target all --lang en
& $env:ACKIT_EXE task "Cross platform source smoke test" --lang en
& $env:ACKIT_EXE report --output .ackit/reports/smoke.html
& $env:ACKIT_EXE webui --output .ackit/webui/index.html
$fakeSecret = "OPENAI" + "_API_KEY=sk-" + "source-smoke-1234567890abcdef"
$fakeSecret | Out-File -FilePath ".env.test" -Encoding utf8
$PSNativeCommandUseErrorActionPreference = $false
& $env:ACKIT_EXE redact-check --profile public-release
$redactExitCode = $LASTEXITCODE
$PSNativeCommandUseErrorActionPreference = $true
if ($redactExitCode -ne 2) {
throw "Expected redact-check exit code 2 for fake secret, got $redactExitCode."
}
Remove-Item -LiteralPath ".env.test" -Force
& $env:ACKIT_EXE scan --ci
}
finally {
Pop-Location
}
}
finally {
Pop-Location
}